From e6a9eb6b85aaf5eaec9ab14832212db877f5d55f Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Thu, 11 Oct 2007 13:24:19 -0700 Subject: [PATCH] setupapi: Implement SetupDiCreateDevRegKeyA on top of SetupDiCreateDevRegKeyW. --- dlls/setupapi/devinst.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 7f9826c4bf2..1f3d3b9fb03 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -1159,9 +1159,29 @@ HKEY WINAPI SetupDiCreateDevRegKeyA( HINF InfHandle, PCSTR InfSectionName) { - FIXME("%p %p %d %d %d %p %s\n", DeviceInfoSet, DeviceInfoData, Scope, + PWSTR InfSectionNameW = NULL; + HKEY key; + + TRACE("%p %p %d %d %d %p %s\n", DeviceInfoSet, DeviceInfoData, Scope, HwProfile, KeyType, InfHandle, debugstr_a(InfSectionName)); - return INVALID_HANDLE_VALUE; + + if (InfHandle) + { + if (!InfSectionName) + { + SetLastError(ERROR_INVALID_PARAMETER); + return INVALID_HANDLE_VALUE; + } + else + { + InfSectionNameW = MultiByteToUnicode(InfSectionName, CP_ACP); + if (InfSectionNameW == NULL) return INVALID_HANDLE_VALUE; + } + } + key = SetupDiCreateDevRegKeyW(DeviceInfoSet, DeviceInfoData, Scope, + HwProfile, KeyType, InfHandle, InfSectionNameW); + MyFree(InfSectionNameW); + return key; } /***********************************************************************