Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LRESULT CALLBACK GetMsgProc(int nCode, WPARAM wParam, LPARAM lParam)
- {
- if(nCode < 0)//Do not process the message
- return CallNextHookEx(msg_hook,nCode,wParam,lParam);
- LPMSG m=(LPMSG)lParam;
- if(m->message == WM_PASTE)
- {
- OutputString("Paste detected!n");
- }
- if(m->message == WM_PASTE)
- {
- OutputString("Paste detected!n");
- }
- return CallNextHookEx(msg_hook,nCode,wParam,lParam);
- }
- //DLL_ATTACH:
- ...
- if(strstr(ProcName, LOADERNAME))
- {
- InitCommonControls();
- if(!(msg_hook=SetWindowsHookEx(WH_GETMESSAGE, GetMsgProc, hinstDLL, 0)))
- {
- ErrorExit(TEXT("SetWindowsHookEx"));
- //MessageBox(0, "WH_GETMESSAGE", 0, 0);
- //return -1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement