Jump to content

PeekMessage from user32.dll


Recommended Posts

Has anyone got a successfull implmentation of the PeekMessage function from user32.dll?

Previous posts about the subject never really resolved anything- here's my attempt:

$msgStruct=DllStructCreate("hwnd Handle;uint message;wparam wParam;lparam lParam;dword Time;ptr Point")
while 1
    $result=DllCall("user32.dll","int","PeekMessage","ptr",DllStructGetPtr($msgStruct),"hwnd",WinGetHandle("SomeTitle"),"int",0,"int",0,"int",0)
    MsgBox(0,@error,DllStructGetData($msgStruct,1)&@CRLF&DllStructGetData($msgStruct,2)&@CRLF&DllStructGetData($msgStruct,3)&@CRLF&DllStructGetData($msgStruct,4))
    Sleep(4000)
WEndoÝ÷ ÚëvÚ zØ^¯­Øb²Ç+ZºÚ"µÍÕRPÜX]J   ][ÝÔÛÛYU]I][ÝÊBÕRTÙ]Ý]J
BÚ[HBTÛY
L
BÑ[

So far no results...

Link to comment
Share on other sites

PeekMessage isn't intended to hook into the message queue of another process, if that's what you're trying to do.

Edited by Siao

"be smart, drink your wine"

Link to comment
Share on other sites

You have to hook the Msg with _WINAPI_SetWindowLong and $GWL_WNDPROC :)

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...