000
13.08.2011, 21:40 Uhr
KlausMaus
|
C++: |
include <windows.h>
HWND hWindow;
HHOOK hhkHook ; HINSTANCE hDllInstance;
LRESULT __declspec(dllexport)__stdcall CALLBACK KeyboardHookProc (int nCode, WPARAM wParam, LPARAM lParam){ if (nCode < 0) return CallNextHookEx (hhkHook, nCode, wParam, lParam);
keybd_event('W',NULL,NULL,NULL);
keybd_event('W',NULL,KEYEVENTF_KEYUP,NULL);
return CallNextHookEx (hhkHook, nCode, wParam, lParam); }
BOOL __declspec (dllexport)__stdcall InstallHook(HWND hParent) { hWindow = hParent ; hhkHook = SetWindowsHookEx(WH_KEYBOARD, KeyboardHookProc, hDllInstance, NULL) ;
return TRUE; }
BOOL __declspec (dllexport)__stdcall CALLBACK UninstallHook( ) { UnhookWindowsHookEx (hhkHook) ;
return TRUE ; }
BOOL __stdcall CALLBACK Main( ) { do { InstallHook(FindWindowA(0,"Metin/warrock/. oder ein andres game wo bei 32 bit geblockt ist....")); Sleep(50); UninstallHook(); Sleep(900); }while(true);
return TRUE; }
BOOL WINAPI DllMain( HMODULE hDll , DWORD dwReason, LPVOID lpReserved ) { if( dwReason == DLL_PROCESS_ATTACH ) { hDllInstance = hDll; CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Main, NULL, NULL, NULL); } return TRUE; }
|
Warum geht das nicht also W wird nirgents wo gedrückt ... |