From 9ac11e38647c9844adfaa575f968881b2c8169c4 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Mon, 24 Sep 2007 12:45:42 -0700 Subject: [PATCH] setupapi: Implement SetupDiGetDeviceInfoListDetailA/W. --- dlls/setupapi/devinst.c | 66 +++++++++++++++++++++++++++++++++++++++++ dlls/setupapi/stubs.c | 18 ----------- 2 files changed, 66 insertions(+), 18 deletions(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index a5356e5e7c8..85ef0ac5c13 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -2102,6 +2102,72 @@ HDEVINFO WINAPI SetupDiGetClassDevsExW( return NULL; } +/*********************************************************************** + * SetupDiGetDeviceInfoListDetailA (SETUPAPI.@) + */ +BOOL WINAPI SetupDiGetDeviceInfoListDetailA( + HDEVINFO DeviceInfoSet, + PSP_DEVINFO_LIST_DETAIL_DATA_A DevInfoData ) +{ + struct DeviceInfoSet *set = (struct DeviceInfoSet *)DeviceInfoSet; + + TRACE("%p %p\n", DeviceInfoSet, DevInfoData); + + if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + if (set->magic != SETUP_DEVICE_INFO_SET_MAGIC) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + if (!DevInfoData || + DevInfoData->cbSize != sizeof(SP_DEVINFO_LIST_DETAIL_DATA_A)) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + memcpy(&DevInfoData->ClassGuid, &set->ClassGuid, sizeof(GUID)); + DevInfoData->RemoteMachineHandle = NULL; + DevInfoData->RemoteMachineName[0] = '\0'; + return TRUE; +} + +/*********************************************************************** + * SetupDiGetDeviceInfoListDetailW (SETUPAPI.@) + */ +BOOL WINAPI SetupDiGetDeviceInfoListDetailW( + HDEVINFO DeviceInfoSet, + PSP_DEVINFO_LIST_DETAIL_DATA_W DevInfoData ) +{ + struct DeviceInfoSet *set = (struct DeviceInfoSet *)DeviceInfoSet; + + TRACE("%p %p\n", DeviceInfoSet, DevInfoData); + + if (!DeviceInfoSet || DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + if (set->magic != SETUP_DEVICE_INFO_SET_MAGIC) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + if (!DevInfoData || + DevInfoData->cbSize != sizeof(SP_DEVINFO_LIST_DETAIL_DATA_W)) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + memcpy(&DevInfoData->ClassGuid, &set->ClassGuid, sizeof(GUID)); + DevInfoData->RemoteMachineHandle = NULL; + DevInfoData->RemoteMachineName[0] = '\0'; + return TRUE; +} + /*********************************************************************** * SetupDiCreateDeviceInterfaceA (SETUPAPI.@) */ diff --git a/dlls/setupapi/stubs.c b/dlls/setupapi/stubs.c index bf3fa90936d..3342a657ca1 100644 --- a/dlls/setupapi/stubs.c +++ b/dlls/setupapi/stubs.c @@ -49,24 +49,6 @@ DWORD WINAPI suErrorToIds16( WORD w1, WORD w2 ) return 0; } -/*********************************************************************** - * SetupDiGetDeviceInfoListDetailA (SETUPAPI.@) - */ -BOOL WINAPI SetupDiGetDeviceInfoListDetailA(HDEVINFO devinfo, PSP_DEVINFO_LIST_DETAIL_DATA_A devinfo_data ) -{ - FIXME("\n"); - return FALSE; -} - -/*********************************************************************** - * SetupDiGetDeviceInfoListDetailW (SETUPAPI.@) - */ -BOOL WINAPI SetupDiGetDeviceInfoListDetailW(HDEVINFO devinfo, PSP_DEVINFO_LIST_DETAIL_DATA_W devinfo_data ) -{ - FIXME("\n"); - return FALSE; -} - /*********************************************************************** * (SETUPAPI.@) *