setupapi: Implement SetupDiCreateDevRegKeyA on top of SetupDiCreateDevRegKeyW.
This commit is contained in:
parent
0138ea49ed
commit
e6a9eb6b85
|
@ -1159,10 +1159,30 @@ HKEY WINAPI SetupDiCreateDevRegKeyA(
|
||||||
HINF InfHandle,
|
HINF InfHandle,
|
||||||
PCSTR InfSectionName)
|
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));
|
HwProfile, KeyType, InfHandle, debugstr_a(InfSectionName));
|
||||||
|
|
||||||
|
if (InfHandle)
|
||||||
|
{
|
||||||
|
if (!InfSectionName)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
return INVALID_HANDLE_VALUE;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SetupDiCreateDevRegKeyW (SETUPAPI.@)
|
* SetupDiCreateDevRegKeyW (SETUPAPI.@)
|
||||||
|
|
Loading…
Reference in New Issue