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.
Silvershaft
2
Junior Poster
Recommended Answers
Jump to PostIf you linked your program with the *.lib file that is generated when you created the dll then all you have to do is run your program. MS-Windows loader will auto-load the dll.
Jump to PostJust 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 …
Jump to PostIs that dll file *.c or *.cpp file? If it's *.cpp then the function prototype in your program should not use
extern "C"
because that changes the function name.
All 9 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Silvershaft
2
Junior Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Silvershaft
2
Junior Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Silvershaft
commented:
Nice help thanks!
+1
Silvershaft
2
Junior Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Silvershaft
2
Junior Poster
Silvershaft
2
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.