user32: implement NotifyWinEvent

This commit is contained in:
itsmattkc 2024-04-19 13:40:20 -07:00
parent 86d0cae272
commit 356bf0888e
2 changed files with 16 additions and 0 deletions

View file

@ -3,6 +3,7 @@ EXPORTS
MsgWaitForMultipleObjects=CORUSR_MsgWaitForMultipleObjects
MsgWaitForMultipleObjectsEx=CORUSR_MsgWaitForMultipleObjectsEx
wsprintfW=CORUSR_wsprintfW
NotifyWinEvent=CORUSR_NotifyWinEvent
GetUserObjectInformationW=USER32.GetUserObjectInformationW
PostMessageW=USER32.PostMessageW

View file

@ -34,3 +34,18 @@ INT WINAPIV CORUSR_wsprintfW(LPWSTR param_0, LPCWSTR param_1, ...)
return r;
}
void WINAPI CORUSR_NotifyWinEvent(DWORD event, HWND hwnd, LONG idObject, LONG idChild)
{
// Only Windows 95 lacks this function so if we have it, we passthrough.
// Otherwise, just do nothing.
typedef void (WINAPI *NotifyWinEvent_t)(DWORD, HWND, LONG, LONG);
NotifyWinEvent_t notifyWinEvent = (NotifyWinEvent_t) GetProcAddress(GetModuleHandleA("USER32.DLL"), "NotifyWinEvent");
Trace(TRACE_IMPLEMENTED, "NotifyWinEvent");
if (notifyWinEvent) {
notifyWinEvent(event, hwnd, idObject, idChild);
}
}