From c3161ba3df5db77bf169524268c5bfcc07f20470 Mon Sep 17 00:00:00 2001 From: winesync Date: Fri, 5 Jan 2024 19:55:15 +0100 Subject: [PATCH] [WINESYNC] setupapi: Add SetupDiGetDevicePropertyW stub. Signed-off-by: Alistair Leslie-Hughes Signed-off-by: Alexandre Julliard wine commit id b32a0eaab9971af4045d6def9c4b2ebaa336636a by Alistair Leslie-Hughes --- dll/win32/setupapi/devinst.c | 14 ++++++++++++++ dll/win32/setupapi/setupapi.spec | 1 + sdk/include/psdk/setupapi.h | 4 ++++ sdk/tools/winesync/setupapi.cfg | 2 +- 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/dll/win32/setupapi/devinst.c b/dll/win32/setupapi/devinst.c index 637d2e7b584..bd9ea522c55 100644 --- a/dll/win32/setupapi/devinst.c +++ b/dll/win32/setupapi/devinst.c @@ -6130,6 +6130,20 @@ BOOL WINAPI SetupDiDeleteDevRegKey( return ret; } +/*********************************************************************** + * SetupDiGetDevicePropertyW (SETUPAPI.@) + */ +BOOL WINAPI SetupDiGetDevicePropertyW(HDEVINFO info_set, PSP_DEVINFO_DATA info_data, + const DEVPROPKEY *prop_key, DEVPROPTYPE *prop_type, BYTE *prop_buff, + DWORD prop_buff_size, DWORD *required_size, DWORD flags) +{ + FIXME("%p, %p, %p, %p, %p, %d, %p, 0x%08x stub\n", info_set, info_data, prop_key, + prop_type, prop_buff, prop_buff_size, required_size, flags); + + SetLastError(ERROR_NOT_FOUND); + return FALSE; +} + /*********************************************************************** * SetupDiRestartDevices (SETUPAPI.@) */ diff --git a/dll/win32/setupapi/setupapi.spec b/dll/win32/setupapi/setupapi.spec index 45045f9e2a5..0c37ad8b410 100644 --- a/dll/win32/setupapi/setupapi.spec +++ b/dll/win32/setupapi/setupapi.spec @@ -327,6 +327,7 @@ @ stdcall SetupDiGetDeviceInterfaceAlias(ptr ptr ptr ptr) @ stdcall SetupDiGetDeviceInterfaceDetailA(long ptr ptr long ptr ptr) @ stdcall SetupDiGetDeviceInterfaceDetailW(long ptr ptr long ptr ptr) +@ stdcall SetupDiGetDevicePropertyW(ptr ptr ptr ptr ptr long ptr long) @ stdcall SetupDiGetDeviceRegistryPropertyA(long ptr long ptr ptr long ptr) @ stdcall SetupDiGetDeviceRegistryPropertyW(long ptr long ptr ptr long ptr) @ stdcall SetupDiGetDriverInfoDetailA(ptr ptr ptr ptr long ptr) diff --git a/sdk/include/psdk/setupapi.h b/sdk/include/psdk/setupapi.h index e32bd6cc87b..e5c52203ff8 100644 --- a/sdk/include/psdk/setupapi.h +++ b/sdk/include/psdk/setupapi.h @@ -1671,6 +1671,8 @@ SetupDiGetDeviceInterfaceDetailW( _Out_opt_ _Out_range_(>=, sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W)) PDWORD RequiredSize, _Out_opt_ PSP_DEVINFO_DATA DeviceInfoData); +WINSETUPAPI BOOL WINAPI SetupDiGetDevicePropertyW(_In_ HDEVINFO, _In_ PSP_DEVINFO_DATA, _In_ const DEVPROPKEY *, _Out_ DEVPROPTYPE *, _Out_opt_ PBYTE, _In_ DWORD, _Out_opt_ PDWORD, _In_ DWORD); + _Success_(return != FALSE) _When_((*PropertyRegDataType == REG_SZ), _At_((PSTR) PropertyBuffer, _Post_valid_)) _When_((*PropertyRegDataType == REG_MULTI_SZ), _At_((PZZSTR) PropertyBuffer, _Post_valid_)) @@ -2524,6 +2526,7 @@ WINSETUPAPI PSTR WINAPI UnicodeToMultiByte(PCWSTR lpUnicodeStr, UINT uCodePage); #define SetupDiGetDeviceInstanceId SetupDiGetDeviceInstanceIdW #define SetupDiGetDeviceInterfaceDetail SetupDiGetDeviceInterfaceDetailW #define SetupDiGetInterfaceDeviceDetail SetupDiGetDeviceInterfaceDetailW +#define SetupDiGetDeviceProperty SetupDiGetDevicePropertyW #define SetupDiGetDeviceRegistryProperty SetupDiGetDeviceRegistryPropertyW #define SetupDiGetDriverInfoDetail SetupDiGetDriverInfoDetailW #define SetupDiGetDriverInstallParams SetupDiGetDriverInstallParamsW @@ -2648,6 +2651,7 @@ WINSETUPAPI PSTR WINAPI UnicodeToMultiByte(PCWSTR lpUnicodeStr, UINT uCodePage); #define SetupDiGetDeviceInstanceId SetupDiGetDeviceInstanceIdA #define SetupDiGetDeviceInterfaceDetail SetupDiGetDeviceInterfaceDetailA #define SetupDiGetInterfaceDeviceDetail SetupDiGetDeviceInterfaceDetailA +// NOTE: SetupDiGetDevicePropertyA does not exist! #define SetupDiGetDeviceRegistryProperty SetupDiGetDeviceRegistryPropertyA #define SetupDiGetDriverInfoDetail SetupDiGetDriverInfoDetailA #define SetupDiGetDriverInstallParams SetupDiGetDriverInstallParamsA diff --git a/sdk/tools/winesync/setupapi.cfg b/sdk/tools/winesync/setupapi.cfg index 9e3da70419d..b9bf28a1380 100644 --- a/sdk/tools/winesync/setupapi.cfg +++ b/sdk/tools/winesync/setupapi.cfg @@ -5,4 +5,4 @@ files: dlls/setupapi/misc.c: dll/win32/setupapi/misc.c dlls/setupapi/stubs.c: dll/win32/setupapi/stubs.c tags: - wine: af533d1eebd382d7ee72eaaef1cf7461356da9e5 + wine: b32a0eaab9971af4045d6def9c4b2ebaa336636a