From 4ad3fcbcaf1e476969366ac74b976533aa222a8c Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 6 Dec 2025 11:49:54 +0200 Subject: [PATCH] [SDK] setupapi.h: Add SetupDiGetDevicePropertyW --- sdk/include/psdk/setupapi.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sdk/include/psdk/setupapi.h b/sdk/include/psdk/setupapi.h index b209c8f00bb..80ee8e8b346 100644 --- a/sdk/include/psdk/setupapi.h +++ b/sdk/include/psdk/setupapi.h @@ -2,6 +2,8 @@ #define _SETUPAPI_H_ #include +#include + #if defined(_WIN64) #include #else @@ -1624,6 +1626,23 @@ SetupDiGetDeviceInterfaceDetailW( _Out_opt_ _Out_range_(>=, sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W)) PDWORD RequiredSize, _Out_opt_ PSP_DEVINFO_DATA DeviceInfoData); +_Success_(return != FALSE) +_When_(*PropertyType == DEVPROP_TYPE_STRING, _At_((PWSTR) PropertyBuffer, _Out_writes_bytes_to_opt_(PropertyBufferSize, *RequiredSize))) +_When_(*PropertyType == DEVPROP_TYPE_STRING_INDIRECT, _At_((PWSTR) PropertyBuffer, _Out_writes_bytes_to_opt_(PropertyBufferSize, *RequiredSize))) +_When_(*PropertyType == DEVPROP_TYPE_STRING_LIST, _At_((PZZWSTR) PropertyBuffer, _Out_writes_bytes_to_opt_(PropertyBufferSize, *RequiredSize))) +WINSETUPAPI +BOOL +WINAPI +SetupDiGetDevicePropertyW( + _In_ HDEVINFO DeviceInfoSet, + _In_ PSP_DEVINFO_DATA DeviceInfoData, + _In_ const DEVPROPKEY *PropertyKey, + _Out_ DEVPROPTYPE *PropertyType, + _Out_writes_bytes_to_opt_(PropertyBufferSize, *RequiredSize) PBYTE PropertyBuffer, + _In_ DWORD PropertyBufferSize, + _Out_opt_ PDWORD RequiredSize, + _In_ DWORD Flags); + _Success_(return != FALSE) _When_((*PropertyRegDataType == REG_SZ), _At_((PSTR) PropertyBuffer, _Post_valid_)) _When_((*PropertyRegDataType == REG_MULTI_SZ), _At_((PZZSTR) PropertyBuffer, _Post_valid_)) @@ -2477,6 +2496,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