News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Problems with Windows hooks

Started by Zap, May 23, 2010, 06:32:39 AM

Previous topic - Next topic

Zap

Hi,I`m a newbie &  working on Iczelion`s tutorial on hooks.My hook doesn`t work though everything seems to be correct.
The hook is very simple, i just want to make sure i understand the way they work,but i don`t seem to,yet.
1.From the main program 3 procs from my dll are invoked:
.IF uMsg==WM_CREATE   
        INVOKE   _InsertMenuItem        ;inserts a menu item to the Notepad menubar
        INVOKE   _SetHook
.ELSEIF uMsg==WM_DESTROY
        INVOKE   _Unhook           
        invoke PostQuitMessage,NULL

2.CallWndProc in my dll just sends me a message when my menu item is chosen.
Please,help,as i`ve been trying & changing stuff for a couple of days but to no avail.
Thanx in advance.

qWord

the code is not complete!
Have you marked the dll's data section as shared?
FPU in a trice: SmplMath
It's that simple!

Zap

it`s complete now,it`s just a simple window.
yes,i did,i put "/section:.bss,S  /section:.data,S" to link,but the problem is
CallWndProc is invoked but the 2 data sections are still invisible to it