GetMSGProc proc nCode:DWORD,wParam:DWORD,lParam:DWORD
.if nCode<0
mov edx,lParam
assume edx:PTR MSG
cmp .message, WM_SYSCOMMAND
jne next
invoke PostMessage,hWnd,WM_ST_HIJ,0,0
assume edx:nothing
.endif
invoke CallNextHookEx,hMSGHook,nCode,wParam,lParam
ret
GetMSGProc endp

Anyone have idea why this code snippet doesn't work?
It's an WH_GETMESSAGE , and i define WM_ST_HIJ in dll and main program. I try it on win xp
Posted on 2002-02-26 14:30:19 by dJed_mRaz
i forgot to say that it's about remote thread specific hook
Posted on 2002-02-26 14:34:51 by dJed_mRaz
Also is there any problem if i call two different hook procedures in one dll.

If anyone had problems with CBT assembling while try to point to CBT_CREATEWNDA lpcs , try change struct declaration in windows.inc to

CBT_CREATEWNDA STRUCT
lpcs CREATESTRUCT <>
hWndInsertAfter DWORD ?
CBT_CREATEWNDA ENDS

I hope that this helps
Posted on 2002-02-26 14:44:52 by dJed_mRaz
Hi dJed_mRaz

I dont think this line works.

.if nCode<0

Try using:

.if nCode>80000000h

KetilO
Posted on 2002-02-26 16:02:01 by KetilO
I try now without even examinate nCode, but i find out that my procedure hooks just posted messages. Anyone know about Spy++ messages nested levels?
Posted on 2002-02-26 16:26:07 by dJed_mRaz