Jump to content

Search the Community

Showing results for tags 'dword'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hello - I am passing several parameters to a DLL successfully, except for one parameter apparently. When I look at the results of what was passed via DllCall there is an extra, leading "1" on one of the parameters. How do I fix this? The $ShutDownWindowTimeout variable is set to "800". When I display the parameters used in DllCall via a messagebox the parameter shows "1800" was passed instead. No matter what number I use it has a 1 leading it. Strange... #include <WinAPI.au3> $ShutDownWindowTimeout=800 $UserActionMessage = "SHUTDOWN" $pTitle = DllStructCreate("char Title[32]") $pMessage = DllStructCreate("char Message[128]") $pResponse = DllStructCreate("DWORD Response") $KernelCall = DllOpen(@SystemDir & "\Kernel32.dll") $SessionId = DllCall($KernelCall, "DWORD", "WTSGetActiveConsoleSessionId") DllClose($KernelCall) DllStructSetData($pTitle, "Title", "Scheduled Power Action") DllStructSetData($pMessage, "Message", "Your computer is scheduled to " & $UserActionMessage & ". Click CANCEL to keep working.") $wtsapiCall = DllOpen(@SystemDir & "\Wtsapi32.dll") $SendMessageResult = DllCall($wtsapiCall,"BOOL","WTSSendMessageA","HANDLE","WTS_CURRENT_SERVER_HANDLE","DWORD",$SessionId[0],"str",DllStructGetData($pTitle, "Title"),"DWORD",DllStructGetSize($pTitle),"str",DllStructGetData($pMessage, "Message"),"DWORD",DllStructGetSize($pMessage),"DWORD","1L","DWORD",$ShutDownWindowTimeout,"DWORD",DllStructGetPtr($pResponse),"BOOL","1") MsgBox(0, "WinAPILastError", _WinAPI_GetLastError() & "," & _WinAPI_GetLastErrorMessage()) MsgBox(0, "DllCall Response,@error", $SendMessageResult[0] & "," & $SendMessageResult[1] & "," & $SendMessageResult[2] & "," & $SendMessageResult[3] & "," & $SendMessageResult[4] & "," & $SendMessageResult[5] & "," & $SendMessageResult[6] & "," & $SendMessageResult[7]& $SendMessageResult[8] & "," & $SendMessageResult[9] & "," & $SendMessageResult[10]) MsgBox(0, "DllCall pointer response", DllStructGetData($pResponse, "Response")) DllClose($wtsapiCall)
×
×
  • Create New...