// KeyHook.dll #include "stdio.h" #include "windows.h" #define DEF_PROCESS_NAME "notepad.exe" HINSTANCE g_hInstance = NULL; // hook procedure가 속한 DLL 핸들 HHOOK g_hHook = NULL; // Hook 핸들 HWND g_hWnd = NULL; BOOL WINAPI DllMain(HINSTANCE hinstDll, DWORD dwReason, LPVOID lpvReserved) { switch(dwReason) { case DLL_PROCESS_ATTACH: g_hInstance = hinstDll; break; case DLL_PROCESS_DETACH: break; } retur..