Skip to content

Commit 9e235fe

Browse files
authored
Merge pull request #569 from RamonUnch/Dynamically-import-NotifyWinEvent
Dynamically import NotifyWinEvent
2 parents 18b26fc + 43509d5 commit 9e235fe

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

unfuck.h

+15
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,21 @@ static BOOL UnhookWinEventL(HWINEVENTHOOK hWinEventHook)
849849
return FALSE;
850850
}
851851

852+
853+
#ifndef WIN64
854+
static void NotifyWinEventL(DWORD event, HWND hwnd, LONG idObj, LONG idChild)
855+
{
856+
typedef void (WINAPI *funk_t)(DWORD, HWND, LONG, LONG);
857+
static funk_t funk = (funk_t)1;
858+
if (funk == (funk_t)1)
859+
funk = (funk_t)LoadDLLProc("USER32.DLL", "NotifyWinEvent");
860+
861+
if (funk)
862+
funk(event, hwnd, idObj, idChild);
863+
}
864+
#define NotifyWinEvent NotifyWinEventL
865+
#endif
866+
852867
static HRESULT DwmGetWindowAttributeL(HWND hwnd, DWORD a, PVOID b, DWORD c)
853868
{
854869
typedef HRESULT (WINAPI *funk_t)(HWND hwnd, DWORD a, PVOID b, DWORD c);

0 commit comments

Comments
 (0)