Skip to content

Commit

Permalink
Merge pull request #569 from RamonUnch/Dynamically-import-NotifyWinEvent
Browse files Browse the repository at this point in the history
Dynamically import NotifyWinEvent
  • Loading branch information
RamonUnch authored Nov 11, 2024
2 parents 18b26fc + 43509d5 commit 9e235fe
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 9e235fe

Please sign in to comment.