Skip to content

Commit

Permalink
Dynamically import NotifyWinEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
RamonUnch authored Nov 11, 2024
1 parent 18b26fc commit 43509d5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions unfuck.h
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,21 @@ static BOOL UnhookWinEventL(HWINEVENTHOOK hWinEventHook)
return FALSE;
}


#ifndef WIN64
static void NotifyWinEventL(DWORD event, HWND hwnd, LONG idObj, LONG idChild)
{
typedef void (WINAPI *funk_t)(DWORD, HWND, LONG, LONG);
static funk_t funk = (funk_t)1;
if (funk == (funk_t)1)
funk = (funk_t)LoadDLLProc("USER32.DLL", "NotifyWinEvent");

if (funk)
funk(event, hwnd, idObj, idChild);
}
#define NotifyWinEvent NotifyWinEventL
#endif

static HRESULT DwmGetWindowAttributeL(HWND hwnd, DWORD a, PVOID b, DWORD c)
{
typedef HRESULT (WINAPI *funk_t)(HWND hwnd, DWORD a, PVOID b, DWORD c);
Expand Down

0 comments on commit 43509d5

Please sign in to comment.