React Native apps use user32.2582 and expect the return value to be non-zero.
From: Zhiyi Zhang zzhang@codeweavers.com
React Native apps use user32.2582 and expect the return value to be non-zero. --- dlls/user32/misc.c | 10 ++++++++++ dlls/user32/tests/input.c | 27 +++++++++++++++++++++++++++ dlls/user32/user32.spec | 2 +- 3 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c index 6333fcb48b4..88554c1cc39 100644 --- a/dlls/user32/misc.c +++ b/dlls/user32/misc.c @@ -543,3 +543,13 @@ LRESULT WINAPI ImeWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) if (!imm_ime_wnd_proc) return DefWindowProcW(hwnd, msg, wParam, lParam); return imm_ime_wnd_proc( hwnd, msg, wParam, lParam, FALSE ); } + +INT WINAPI ScheduleDispatchNotification(HWND hwnd) +{ + FIXME("(%p): stub\n", hwnd); + + if (IsWindow(hwnd)) + return 2; + + return 0; +} diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 4d4c3c81000..f5528e7579c 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -430,6 +430,7 @@ static UINT (WINAPI *pGetRawInputDeviceInfoW) (HANDLE, UINT, void *, UINT *); static UINT (WINAPI *pGetRawInputDeviceInfoA) (HANDLE, UINT, void *, UINT *); static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL); static HKL (WINAPI *pLoadKeyboardLayoutEx)(HKL, const WCHAR *, UINT); +static INT (WINAPI *pScheduleDispatchNotification)(HWND);
/**********************adapted from input.c **********************************/
@@ -439,6 +440,8 @@ static void init_function_pointers(void) { HMODULE hdll = GetModuleHandleA("user32");
+ pScheduleDispatchNotification = (void*)GetProcAddress(hdll, (LPCSTR)2582); + #define GET_PROC(func) \ if (!(p ## func = (void*)GetProcAddress(hdll, #func))) \ trace("GetProcAddress(%s) failed\n", #func) @@ -6308,6 +6311,29 @@ static void test_SetFocus_process(void) DestroyWindow( hwnd ); }
+static void test_ScheduleDispatchNotification(void) +{ + HWND hwnd; + INT ret; + + if (!pScheduleDispatchNotification) + { + win_skip("ScheduleDispatchNotification is unavailable.\n"); + return; + } + + hwnd = CreateWindowW(L"static", NULL, WS_POPUP | WS_VISIBLE, 100, 100, 200, 200, NULL, NULL, + NULL, NULL); + + ret = pScheduleDispatchNotification(NULL); + ok(!ret, "Got unexpected %d.\n", ret); + + ret = pScheduleDispatchNotification(hwnd); + ok(ret == 2, "Got unexpected %d.\n", ret); + + DestroyWindow(hwnd); +} + START_TEST(input) { char **argv; @@ -6352,6 +6378,7 @@ START_TEST(input) test_OemKeyScan(); test_rawinput(argv[0]); test_DefRawInputProc(); + test_ScheduleDispatchNotification();
if(pGetMouseMovePointsEx) test_GetMouseMovePointsEx( argv ); diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 494c8b7a983..5f4d6849642 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -93,7 +93,7 @@ 2579 stub -noname SetWindowShowState # NtUserSetWindowShowState
2581 stub -noname GetWindowTrackInfoAsync # NtUserGetWindowTrackInfoAsync -2582 stub -noname ScheduleDispatchNotification # NtUserScheduleDispatchNotification +2582 stdcall -noname ScheduleDispatchNotification(ptr) # NtUserScheduleDispatchNotification
2584 stub -noname EnableModernAppWindowKeyboardIntercept # NtUserEnableModernAppWindowKeyboardIntercept 2585 stub -noname UpdateWindowTrackingInfo # NtUserUpdateWindowTrackingInfo
This is supposed to be a simple forward to win32u, it would be better to put the stub there.