From 287d5852554b5e259ae6f3754482ccec16e51beb Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Wed, 30 Nov 2005 18:41:46 +0000 Subject: [PATCH] implemented SetupDiGetClassDevPropertySheetsA svn path=/trunk/; revision=19783 --- reactos/lib/setupapi/devinst.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/reactos/lib/setupapi/devinst.c b/reactos/lib/setupapi/devinst.c index b103d239710..def6e5277ab 100644 --- a/reactos/lib/setupapi/devinst.c +++ b/reactos/lib/setupapi/devinst.c @@ -3584,11 +3584,27 @@ BOOL WINAPI SetupDiGetClassDevPropertySheetsA( OUT PDWORD RequiredSize OPTIONAL, IN DWORD PropertySheetType) { - FIXME ("Stub %p %p %p %d %p %d\n", - DeviceInfoSet, DeviceInfoData, PropertySheetHeader, PropertySheetHeaderPageListSize, - RequiredSize, PropertySheetType); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + PROPSHEETHEADERW psh; + BOOL ret = FALSE; + + TRACE("%p %p %p 0%lx %p 0x%lx\n", DeviceInfoSet, DeviceInfoData, + PropertySheetHeader, PropertySheetHeaderPageListSize, + RequiredSize, PropertySheetType); + + psh.dwFlags = PropertySheetHeader->dwFlags; + psh.phpage = PropertySheetHeader->phpage; + psh.nPages = PropertySheetHeader->nPages; + + ret = SetupDiGetClassDevPropertySheetsW(DeviceInfoSet, DeviceInfoData, PropertySheetHeader ? &psh : NULL, + PropertySheetHeaderPageListSize, RequiredSize, + PropertySheetType); + if (ret) + { + PropertySheetHeader->nPages = psh.nPages; + } + + TRACE("Returning %d\n", ret); + return ret; } struct ClassDevPropertySheetsData @@ -3642,6 +3658,8 @@ BOOL WINAPI SetupDiGetClassDevPropertySheetsW( SetLastError(ERROR_INVALID_HANDLE); else if (!PropertySheetHeader) SetLastError(ERROR_INVALID_PARAMETER); + else if (PropertySheetHeader->dwFlags & PSH_PROPSHEETPAGE) + SetLastError(ERROR_INVALID_FLAGS); else if (DeviceInfoData && DeviceInfoData->cbSize != sizeof(SP_DEVINFO_DATA)) SetLastError(ERROR_INVALID_USER_BUFFER); else if (!DeviceInfoData && IsEqualIID(&list->ClassGuid, &GUID_NULL))