I've written a DLL with keyboard hook inside, how do I load the dll in my code and like activate it, the hook function inside dll writes keyboard presses to a file, I would like to activate it from my exe.
Just call it exactly like you would any other function. All the functions contained in the standard C and C++ libraries are contained in DLLs -- there is nothing any different about how to call the function in your dll.
If you used __export in the DLL then you will need to use __import in the function prototype in your program.
I've been trying to test your program, but so far it hasn't worked for me either. If you are trying to use keyboard hook then the first parameter to SetWindowsHookEx() must be WH_KEYBOARD. Even with that change the hook function is not being called when a key is pressed.
Okay I will try to change it.. It should run on my program logging the keys that user presses.. It works if I put messagebox after it.
Edit it works only if its WM_KEYBOARD_LL referring to http://www.daniweb.com/code/snippet217096.html