|
-
July 22nd, 2010, 09:43 PM
#11
Re: How do I write basic DLL injection file?
So I have more questions about creating a DLL:
I know I need to create a header file for the DLL along with the source code for the DLL.
Header would look something like this:
#ifdef NOTEPAD2_EXPORTS
#define NOTEPAD2_API __declspec(dllexport)
#else
#define NOTEPAD2_API __declspec(dllimport)
#endif
extern "C" NOTEPAD2_API bool InstallHook(LPCWSTR NotepadPath, bool installCBTHook);
extern "C" NOTEPAD2_API void UninstallHook();
Would the source code for the DLL simply define the functions "InstallHook" and "UninstallHook"? Would that be enough to create the DLL and it's libraries?
The following code would simply use the DLL file, correct, but would *not* be included in the DLL?:
LRESULT CALLBACK CBTProc(int nCode, WPARAM wParam, LPARAM lParam)
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|