I've put together a program that was working at one point, but
now gives me a fatal exception...and not being the greatest programmer of win32 yet I don't know what kind of thing I am
looking for that would cause or solve this problem!!
I have atached my source files which run from
d:\development\key32
if you use another path you have to change the settings as it copies a dll to the release directory of the main program!
The program should istall windows hooks, but as i said i get a fatal exception and have no idea how to solve it!!
Could anybody maybe have a look and tell me where i have gone wrong?!
I haven't used LoadLibrary() very much... and I am sure someone else here could give you a better answer than I... but...
Your call to ProcPaintHooksDll() in WM_PAINT is where its crashing... I dont know if you knew that or not but... I moved the call to FreeLibrary() to the end of WinMain()... and it didnt crash when it tried to call it... there seems to be another error having to do with calling conventions...
I don't think you are allowed to free a library if you want to use it's functions. Don't forget, freeing a library means that it's functions are no longer available to the program! You would most likely get an access violation with the first call to a library function. Also I would use linking on load time (includeing the import library, declaring function prototypes) since it makes live far easier for you and you don't have to mess with function pointers. This isthe better choice since you use the library functions throughout the program.
My browser goes crazy!!!!!!!!!
AAAAAAAHHHHHHHHHHHHHHHH!!!!!!!!!!
All the buzzt CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.