From 040332c0067613b305565124aa9786823b355ffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 10 Nov 2007 14:07:45 +0000 Subject: [PATCH] Add a stub for SetupDiDeleteDevRegKey svn path=/trunk/; revision=30325 --- reactos/dll/win32/setupapi/devinst.c | 57 ++++++++++++++++++++++++ reactos/dll/win32/setupapi/setupapi.spec | 2 +- 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/setupapi/devinst.c b/reactos/dll/win32/setupapi/devinst.c index feccf2b7c70..a79e3f5ad3f 100644 --- a/reactos/dll/win32/setupapi/devinst.c +++ b/reactos/dll/win32/setupapi/devinst.c @@ -3553,3 +3553,60 @@ cleanup: TRACE("Returning %d\n", ret); return ret; } + +/*********************************************************************** + * SetupDiDeleteDevRegKey (SETUPAPI.@) + */ +BOOL WINAPI SetupDiDeleteDevRegKey( + HDEVINFO DeviceInfoSet, + PSP_DEVINFO_DATA DeviceInfoData, + DWORD Scope, + DWORD HwProfile, + DWORD KeyType) +{ + struct DeviceInfoSet *set = (struct DeviceInfoSet *)DeviceInfoSet; + struct DeviceInfo *devInfo; + BOOL ret = FALSE; + + TRACE("%p %p %d %d %d\n", DeviceInfoSet, DeviceInfoData, Scope, HwProfile, + KeyType); + + 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 (!DeviceInfoData || DeviceInfoData->cbSize != sizeof(SP_DEVINFO_DATA) + || !DeviceInfoData->Reserved) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if (Scope != DICS_FLAG_GLOBAL && Scope != DICS_FLAG_CONFIGSPECIFIC) + { + SetLastError(ERROR_INVALID_FLAGS); + return FALSE; + } + if (KeyType != DIREG_DEV && KeyType != DIREG_DRV) + { + SetLastError(ERROR_INVALID_FLAGS); + return FALSE; + } + devInfo = (struct DeviceInfo *)DeviceInfoData->Reserved; + if (devInfo->set != set) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + switch (KeyType) + { + default: + WARN("unknown KeyType %d\n", KeyType); + } + return ret; +} diff --git a/reactos/dll/win32/setupapi/setupapi.spec b/reactos/dll/win32/setupapi/setupapi.spec index e3b9addc9dd..7fefb8b5e60 100644 --- a/reactos/dll/win32/setupapi/setupapi.spec +++ b/reactos/dll/win32/setupapi/setupapi.spec @@ -289,7 +289,7 @@ @ stdcall SetupDiCreateDeviceInfoList(ptr ptr) @ stdcall SetupDiCreateDeviceInfoListExA(ptr long str ptr) @ stdcall SetupDiCreateDeviceInfoListExW(ptr long wstr ptr) -@ stub SetupDiDeleteDevRegKey +@ stdcall SetupDiDeleteDevRegKey(ptr ptr long long long) @ stdcall SetupDiDeleteDeviceInfo(long ptr) @ stub SetupDiDeleteDeviceInterfaceData @ stdcall SetupDiDestroyClassImageList(ptr)