From 6ea94e605932005278f49d434dbc4cb89f50362e Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sat, 29 Oct 2005 09:59:30 +0000 Subject: [PATCH] implemented SetupDiCreateDevRegKeyA svn path=/trunk/; revision=18840 --- reactos/lib/setupapi/devinst.c | 37 +++++++++++++++++++++++++++++- reactos/lib/setupapi/setupapi.spec | 2 +- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/reactos/lib/setupapi/devinst.c b/reactos/lib/setupapi/devinst.c index 9c5b9452860..1119d244dcf 100644 --- a/reactos/lib/setupapi/devinst.c +++ b/reactos/lib/setupapi/devinst.c @@ -3486,7 +3486,42 @@ BOOL WINAPI SetupDiSetDeviceInstallParamsW( } /*********************************************************************** - * SetupDiCreateDevRegKey (SETUPAPI.@) + * SetupDiCreateDevRegKeyA (SETUPAPI.@) + */ +HKEY WINAPI SetupDiCreateDevRegKeyA( + IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData, + IN DWORD Scope, + IN DWORD HwProfile, + IN DWORD KeyType, + IN HINF InfHandle OPTIONAL, + IN PCSTR InfSectionName OPTIONAL) +{ + PCWSTR InfSectionNameW = NULL; + HKEY ret = INVALID_HANDLE_VALUE; + + if (InfSectionName) + { + InfSectionNameW = MultiByteToUnicode(InfSectionName, CP_ACP); + if (InfSectionNameW == NULL) return INVALID_HANDLE_VALUE; + } + + ret = SetupDiCreateDevRegKeyW(DeviceInfoSet, + DeviceInfoData, + Scope, + HwProfile, + KeyType, + InfHandle, + InfSectionNameW); + + if (InfSectionNameW != NULL) + MyFree((PVOID)InfSectionNameW); + + return ret; +} + +/*********************************************************************** + * SetupDiCreateDevRegKeyW (SETUPAPI.@) */ HKEY WINAPI SetupDiCreateDevRegKeyW( IN HDEVINFO DeviceInfoSet, diff --git a/reactos/lib/setupapi/setupapi.spec b/reactos/lib/setupapi/setupapi.spec index c89a6ee1184..41f97dbb6b3 100644 --- a/reactos/lib/setupapi/setupapi.spec +++ b/reactos/lib/setupapi/setupapi.spec @@ -281,7 +281,7 @@ @ stdcall SetupDiClassNameFromGuidExA(ptr str long ptr wstr ptr) @ stdcall SetupDiClassNameFromGuidExW(ptr wstr long ptr wstr ptr) @ stdcall SetupDiClassNameFromGuidW(ptr wstr long ptr) -@ stub SetupDiCreateDevRegKeyA +@ stdcall SetupDiCreateDevRegKeyA(ptr ptr long long long ptr str) @ stdcall SetupDiCreateDevRegKeyW(ptr ptr long long long ptr wstr) @ stdcall SetupDiCreateDeviceInfoA(ptr str ptr str ptr long ptr) @ stdcall SetupDiCreateDeviceInfoW(ptr wstr ptr wstr ptr long ptr)