Module: wine Branch: master Commit: 4021dde40d6ac7fa80074039906b54ebdd509550 URL: https://gitlab.winehq.org/wine/wine/-/commit/4021dde40d6ac7fa80074039906b54e...
Author: Paul Gofman pgofman@codeweavers.com Date: Mon Jul 10 14:20:40 2023 -0600
kernelbase: Add stub for QueryIoRingCapabilities().
---
dlls/kernelbase/file.c | 12 +++++++++ dlls/kernelbase/kernelbase.spec | 1 + dlls/kernelbase/tests/Makefile.in | 1 + dlls/kernelbase/tests/file.c | 57 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+)
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c index 7c2e132bdcb..29d005e0e28 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -36,6 +36,7 @@ #include "shlwapi.h" #include "ddk/ntddk.h" #include "ddk/ntddser.h" +#include "ioringapi.h"
#include "kernelbase.h" #include "wine/exception.h" @@ -4483,3 +4484,14 @@ BOOL WINAPI DECLSPEC_HOTPATCH WaitCommEvent( HANDLE handle, DWORD *events, OVERL return DeviceIoControl( handle, IOCTL_SERIAL_WAIT_ON_MASK, NULL, 0, events, sizeof(*events), NULL, overlapped ); } + + +/*********************************************************************** + * QueryIoRingCapabilities (kernelbase.@) + */ +HRESULT WINAPI QueryIoRingCapabilities(IORING_CAPABILITIES *caps) +{ + FIXME( "caps %p stub.\n", caps ); + + return E_NOTIMPL; +} diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 17ae37e824c..46492a59d92 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1232,6 +1232,7 @@ @ stdcall QueryDosDeviceW(wstr ptr long) @ stdcall QueryFullProcessImageNameA(ptr long ptr ptr) @ stdcall QueryFullProcessImageNameW(ptr long ptr ptr) +@ stdcall QueryIoRingCapabilities(ptr) # @ stub QueryIdleProcessorCycleTime # @ stub QueryIdleProcessorCycleTimeEx @ stdcall QueryInterruptTime(ptr) diff --git a/dlls/kernelbase/tests/Makefile.in b/dlls/kernelbase/tests/Makefile.in index 675054c753d..b51eaefcd13 100644 --- a/dlls/kernelbase/tests/Makefile.in +++ b/dlls/kernelbase/tests/Makefile.in @@ -1,6 +1,7 @@ TESTDLL = kernelbase.dll
C_SRCS = \ + file.c \ path.c \ process.c \ sync.c diff --git a/dlls/kernelbase/tests/file.c b/dlls/kernelbase/tests/file.c new file mode 100644 index 00000000000..18dff0a32ab --- /dev/null +++ b/dlls/kernelbase/tests/file.c @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2023 Paul Gofman for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> +#include <stdlib.h> + +#include <ntstatus.h> +#define WIN32_NO_STATUS +#include <windef.h> +#include <winbase.h> +#include <winerror.h> +#include <ioringapi.h> + +#include "wine/test.h" + +static HRESULT (WINAPI *pQueryIoRingCapabilities)(IORING_CAPABILITIES *); + +static void test_ioring_caps(void) +{ + IORING_CAPABILITIES caps; + HRESULT hr; + + if (!pQueryIoRingCapabilities) + { + win_skip("QueryIoRingCapabilities is not available, skipping tests.\n"); + return; + } + + memset(&caps, 0xcc, sizeof(caps)); + hr = pQueryIoRingCapabilities(&caps); + todo_wine ok(hr == S_OK, "got %#lx.\n", hr); +} + +START_TEST(file) +{ + HMODULE hmod; + + hmod = LoadLibraryA("kernelbase.dll"); + pQueryIoRingCapabilities = (void *)GetProcAddress(hmod, "QueryIoRingCapabilities"); + + test_ioring_caps(); +}