Code:
LRESULT CALLBACK MyWndProc(UINT Msg, WPARAM wParam, LPARAM lParam)
{
if (Msg == WM_USER+100)
{
UnHook;
} else if (Msg == WM_USER+101) {
SendMessage(HWND_BROADCAST, 0, 0x1337, 0x1337);
}
return CallNextHookEx(MsgHook, Msg, wParam, lParam);
}
MsgHook = SetWindowsHookEx(WH_CALLWNDPROC, (HOOKPROC)MyWndProc, (HINSTANCE)hInst, GetCurrentThreadId());
any ideas?
EDIT: ok appears the crashing was a secondary problem caused by something totally unrelated, now that it doesent crash tho it just does nothing at all, i tried changing message to 0 (WM_NULL) to see if it even gets anything but it doesent :/






