Quote:
Originally posted by bennyandthejets
Good point about the error checking. I didn't put it in the code because I'd already confirmed each call was working. It seems that WaitingForASingleObject is the way to go.
I have another problem though: my app won't load up until I click ok in the message box (the hook code is in WM_CREATE). Won't this be bad for my app?
I didnt think you had this code as part of a window procedure...I thought your app was terminating after that code (as mine did)....if that is not the case, then remove WaitForSingleObject and also dot do anything in WM_CREATE like the CloseHandle call you had...or the VirtualFreeEx calls. If you want to cleanup....put CloseHandle/VirtualFreeEx in WM_DESTROY