I'm writing a program to monitor and log all windows events (WM_***
messages) using a Windows hook. Everything is going fine, but I'm facing a
problem getting the name of the window to which the handle belongs. When I
try to use GetWindowText() within the hook function, it again posts a
message (WM_GETTEXT), which will trigger the hook again, setting off an
infinite loop. I was thinking of locking out the hook function with a static
flag, so that it isn't re-entrant. Is this okay, or will it prevent me from
logging other legitimate calls? Or is there another method you can suggest?
One more thing, while I was writing this program, I noticed that Dev
overwrites the `.def' files when it's creating a DLL (by specifying the
`--output-def' option to `dllwrap'), so I'm unable to import/export
functions by ordinal (which is more efficient). Can the authors please fix
it so that the def files we create are maintained?
___________________________________________________________
Abhijit Shylanath
E-mail: mu...@gm... || ibr...@bi...
Web-site: http://mudeth.tripod.com/
|