[PATCH 0/1] MR10430: ninput: Add Ordinal2502().
For React Native. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10430
From: Zhiyi Zhang <zzhang@codeweavers.com> For React Native. --- dlls/ninput/main.c | 11 +++++++++++ dlls/ninput/ninput.spec | 1 + dlls/ninput/tests/ninput.c | 25 +++++++++++++++++++++++++ 3 files changed, 37 insertions(+) diff --git a/dlls/ninput/main.c b/dlls/ninput/main.c index 062b1c4a3a7..13cbdf4f005 100644 --- a/dlls/ninput/main.c +++ b/dlls/ninput/main.c @@ -257,3 +257,14 @@ HRESULT WINAPI ProcessInertiaInteractionContext(HINTERACTIONCONTEXT context) FIXME("context %p: stub!\n", context); return E_NOTIMPL; } + +/* Undocumented function at ordinal 2502 */ +HRESULT WINAPI Ordinal2502(HINTERACTIONCONTEXT *context, void *p1, void *p2) +{ + FIXME("context %p p1 %p p2 %p: stub!\n", context, p1, p2); + + if (!context) + return E_HANDLE; + + return S_OK; +} diff --git a/dlls/ninput/ninput.spec b/dlls/ninput/ninput.spec index 85f0e21a146..204947a8d6f 100644 --- a/dlls/ninput/ninput.spec +++ b/dlls/ninput/ninput.spec @@ -22,3 +22,4 @@ @ stub SetPivotInteractionContext @ stdcall SetPropertyInteractionContext(ptr long long) @ stub StopInteractionContext +2502 stdcall -noname Ordinal2502(ptr ptr ptr) diff --git a/dlls/ninput/tests/ninput.c b/dlls/ninput/tests/ninput.c index 3409fedd868..97434f1624b 100644 --- a/dlls/ninput/tests/ninput.c +++ b/dlls/ninput/tests/ninput.c @@ -296,6 +296,30 @@ static void test_ProcessBufferedPacketsInteractionContext(void) ok(hr == S_OK, "Failed to destroy context, hr %#lx.\n", hr); } +static void test_ordinal_2502(void) +{ + static HRESULT (WINAPI *pOrdinal2502)(void *, void *, void *); + HINTERACTIONCONTEXT context; + HMODULE module; + HRESULT hr; + + module = GetModuleHandleA("ninput"); + pOrdinal2502 = (void *)GetProcAddress(module, (LPCSTR)2502); + ok(!!pOrdinal2502, "Failed to retrieve the function at ordinal 2502.\n"); + + hr = pOrdinal2502(NULL, NULL, NULL); + ok(hr == E_HANDLE, "Got unexpected hr %#lx.\n", hr); + + hr = CreateInteractionContext(&context); + ok(hr == S_OK, "Failed to create context, hr %#lx.\n", hr); + + hr = pOrdinal2502(context, NULL, NULL); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + hr = DestroyInteractionContext(context); + ok(hr == S_OK, "Failed to destroy context, hr %#lx.\n", hr); +} + START_TEST(ninput) { test_context(); @@ -304,4 +328,5 @@ START_TEST(ninput) test_BufferPointerPacketsInteractionContext(); test_GetStateInteractionContext(); test_ProcessBufferedPacketsInteractionContext(); + test_ordinal_2502(); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10430
participants (2)
-
Zhiyi Zhang -
Zhiyi Zhang (@zhiyi)