1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do I write basic DLL injection file?

Discussion in 'Win32' started by sysop1911, Jul 21, 2010.

  1. sysop1911

    sysop1911 New Member

    Jul 1, 2010
    Likes Received:
    Trophy Points:
    I'm just starting to learn Windows API. I can program a window to open, to be full screen, change colors, etc. I want to program the most basic type of DLL injection using a windows hook. Let's say I want the code to tell me when notepad is open, then inject the DLL into Notepad, then re-direct the text entered in Notepad into my other program. Can someone point me in the right direction? I realize I should use SetWindowsHookEx and CallNextHookEx. I want to use WH_CBT hook. I don't want someone to write up the code, just help me out a bit. How do I create the DLL? Would I have the main executable be the program that injects the DLL into notepad while the DLL itself if the program that sends the Notepad messages to the main program? Thanks.

Share This Page