mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 00:50:23 +00:00
Don't compare GUID strings with wcsicmp, but compare GUID* with IsEqualIID
Directly use HKEY_LOCAL_MACHINE instead of RegOpenKey(HKEY_LOCAL_MACHINE, NULL, ...). Remove use of UNICODE_NULL Replace #ifdef __WINE__ by #ifdef __WINESRC__ Fix SetupDiCallClassInstaller prototype (DWORD -> DI_FUNCTION) Thanks Usurp for your testing on Wine! This file works now unmodified in Wine. A patch would be soon sent to wine-patches ML. svn path=/trunk/; revision=16713
This commit is contained in:
parent
6aeadd25fd
commit
8c34b25c71
1 changed files with 49 additions and 53 deletions
|
@ -91,7 +91,7 @@ typedef struct _DeviceInfo
|
||||||
{
|
{
|
||||||
GUID InterfaceGuid;
|
GUID InterfaceGuid;
|
||||||
GUID ClassGuid;
|
GUID ClassGuid;
|
||||||
#ifndef __WINE__
|
#ifndef __WINESRC__
|
||||||
/* Pointer into Data field. Contains something like */
|
/* Pointer into Data field. Contains something like */
|
||||||
/* "ACPI\PNP0501\4&2658d0a0&0" */
|
/* "ACPI\PNP0501\4&2658d0a0&0" */
|
||||||
PWSTR pInstancePath;
|
PWSTR pInstancePath;
|
||||||
|
@ -670,15 +670,20 @@ SetupDiCreateDeviceInfoListExW(const GUID *ClassGuid,
|
||||||
list->hWnd = hwndParent;
|
list->hWnd = hwndParent;
|
||||||
list->numberOfEntries = 0;
|
list->numberOfEntries = 0;
|
||||||
if (MachineName)
|
if (MachineName)
|
||||||
rc = RegConnectRegistryW(MachineName, HKEY_LOCAL_MACHINE, &list->HKLM);
|
|
||||||
else
|
|
||||||
rc = RegOpenKey(HKEY_LOCAL_MACHINE, NULL, &list->HKLM);
|
|
||||||
if (rc != ERROR_SUCCESS)
|
|
||||||
{
|
{
|
||||||
SetLastError(rc);
|
rc = RegConnectRegistryW(MachineName, HKEY_LOCAL_MACHINE, &list->HKLM);
|
||||||
HeapFree(GetProcessHeap(), 0, list);
|
if (rc != ERROR_SUCCESS)
|
||||||
return (HDEVINFO)INVALID_HANDLE_VALUE;
|
{
|
||||||
|
SetLastError(rc);
|
||||||
|
HeapFree(GetProcessHeap(), 0, list);
|
||||||
|
return (HDEVINFO)INVALID_HANDLE_VALUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
list->HKLM = HKEY_LOCAL_MACHINE;
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(
|
memcpy(
|
||||||
&list->ClassGuid,
|
&list->ClassGuid,
|
||||||
ClassGuid ? ClassGuid : &GUID_NULL,
|
ClassGuid ? ClassGuid : &GUID_NULL,
|
||||||
|
@ -1090,7 +1095,6 @@ end:
|
||||||
static LONG SETUP_CreateDevListFromEnumerator(
|
static LONG SETUP_CreateDevListFromEnumerator(
|
||||||
DeviceInfoList* list,
|
DeviceInfoList* list,
|
||||||
LPCGUID pClassGuid OPTIONAL,
|
LPCGUID pClassGuid OPTIONAL,
|
||||||
LPCWSTR pClassGuidW OPTIONAL, /* pClassGuid in string form */
|
|
||||||
LPCWSTR Enumerator,
|
LPCWSTR Enumerator,
|
||||||
HKEY hEnumeratorKey) /* handle to Enumerator registry key */
|
HKEY hEnumeratorKey) /* handle to Enumerator registry key */
|
||||||
{
|
{
|
||||||
|
@ -1146,16 +1150,16 @@ static LONG SETUP_CreateDevListFromEnumerator(
|
||||||
RegCloseKey(hDeviceIdKey);
|
RegCloseKey(hDeviceIdKey);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
*pEndOfInstancePath = UNICODE_NULL;
|
*pEndOfInstancePath = '\0';
|
||||||
wcscat(InstancePath, KeyBuffer);
|
wcscat(InstancePath, KeyBuffer);
|
||||||
|
|
||||||
/* Read ClassGUID value */
|
/* Read ClassGUID value */
|
||||||
dwLength = sizeof(KeyBuffer) - sizeof(UNICODE_NULL);
|
dwLength = sizeof(KeyBuffer) - sizeof(WCHAR);
|
||||||
rc = RegQueryValueExW(hInstanceIdKey, ClassGUID, NULL, &dwRegType, (LPBYTE)KeyBuffer, &dwLength);
|
rc = RegQueryValueExW(hInstanceIdKey, ClassGUID, NULL, &dwRegType, (LPBYTE)KeyBuffer, &dwLength);
|
||||||
RegCloseKey(hInstanceIdKey);
|
RegCloseKey(hInstanceIdKey);
|
||||||
if (rc == ERROR_FILE_NOT_FOUND)
|
if (rc == ERROR_FILE_NOT_FOUND)
|
||||||
{
|
{
|
||||||
if (pClassGuidW)
|
if (pClassGuid)
|
||||||
/* Skip this bad entry as we can't verify it */
|
/* Skip this bad entry as we can't verify it */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1169,15 +1173,21 @@ static LONG SETUP_CreateDevListFromEnumerator(
|
||||||
RegCloseKey(hDeviceIdKey);
|
RegCloseKey(hDeviceIdKey);
|
||||||
return ERROR_GEN_FAILURE;
|
return ERROR_GEN_FAILURE;
|
||||||
}
|
}
|
||||||
else if (pClassGuidW)
|
else if (pClassGuid)
|
||||||
{
|
{
|
||||||
if (wcsicmp(KeyBuffer, pClassGuidW) != 0)
|
GUID KeyGuid;
|
||||||
|
if (UuidFromStringW(&KeyBuffer[1], &KeyGuid) != RPC_S_OK)
|
||||||
|
{
|
||||||
|
RegCloseKey(hDeviceIdKey);
|
||||||
|
return GetLastError();
|
||||||
|
}
|
||||||
|
if (!IsEqualIID(&KeyGuid, pClassGuid))
|
||||||
/* Skip this entry as it is not the right device class */
|
/* Skip this entry as it is not the right device class */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add the entry to the list */
|
/* Add the entry to the list */
|
||||||
deviceInfo = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(DeviceInfo, Device.InstancePath) + wcslen(InstancePath) * sizeof(WCHAR) + sizeof(UNICODE_NULL));
|
deviceInfo = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(DeviceInfo, Device.InstancePath) + (wcslen(InstancePath) + 1) * sizeof(WCHAR));
|
||||||
if (!deviceInfo)
|
if (!deviceInfo)
|
||||||
{
|
{
|
||||||
RegCloseKey(hDeviceIdKey);
|
RegCloseKey(hDeviceIdKey);
|
||||||
|
@ -1202,28 +1212,13 @@ static LONG SETUP_CreateDevList(
|
||||||
PCWSTR Enumerator OPTIONAL)
|
PCWSTR Enumerator OPTIONAL)
|
||||||
{
|
{
|
||||||
HKEY HKLM, hEnumKey, hEnumeratorKey;
|
HKEY HKLM, hEnumKey, hEnumeratorKey;
|
||||||
WCHAR szGuidString[MAX_GUID_STRING_LEN + 3];
|
|
||||||
WCHAR KeyBuffer[MAX_PATH];
|
WCHAR KeyBuffer[MAX_PATH];
|
||||||
DWORD i;
|
DWORD i;
|
||||||
DWORD dwLength;
|
DWORD dwLength;
|
||||||
DWORD rc;
|
DWORD rc;
|
||||||
|
|
||||||
/* Create szGuidString */
|
if (IsEqualIID(class, &GUID_NULL))
|
||||||
if (class && !IsEqualIID(&class, &GUID_NULL))
|
|
||||||
{
|
|
||||||
LPWSTR lpGuidString;
|
|
||||||
if (UuidToStringW((UUID *)class, &lpGuidString) != RPC_S_OK)
|
|
||||||
return ERROR_GEN_FAILURE;
|
|
||||||
wcscpy(szGuidString, L"{");
|
|
||||||
wcscat(szGuidString, lpGuidString);
|
|
||||||
wcscat(szGuidString, L"}");
|
|
||||||
RpcStringFreeW(&lpGuidString);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
class = NULL;
|
class = NULL;
|
||||||
szGuidString[0] = UNICODE_NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Open Enum key */
|
/* Open Enum key */
|
||||||
if (MachineName != NULL)
|
if (MachineName != NULL)
|
||||||
|
@ -1259,7 +1254,7 @@ static LONG SETUP_CreateDevList(
|
||||||
RegCloseKey(hEnumKey);
|
RegCloseKey(hEnumKey);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
return rc;
|
return rc;
|
||||||
rc = SETUP_CreateDevListFromEnumerator(list, class, *szGuidString ? szGuidString : NULL, Enumerator, hEnumeratorKey);
|
rc = SETUP_CreateDevListFromEnumerator(list, class, Enumerator, hEnumeratorKey);
|
||||||
RegCloseKey(hEnumeratorKey);
|
RegCloseKey(hEnumeratorKey);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -1289,7 +1284,7 @@ static LONG SETUP_CreateDevList(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call SETUP_CreateDevListFromEnumerator */
|
/* Call SETUP_CreateDevListFromEnumerator */
|
||||||
rc = SETUP_CreateDevListFromEnumerator(list, class, *szGuidString ? szGuidString : NULL, KeyBuffer, hEnumeratorKey);
|
rc = SETUP_CreateDevListFromEnumerator(list, class, KeyBuffer, hEnumeratorKey);
|
||||||
RegCloseKey(hEnumeratorKey);
|
RegCloseKey(hEnumeratorKey);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -1302,7 +1297,7 @@ static LONG SETUP_CreateDevList(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WINE__
|
#ifdef __WINESRC__
|
||||||
static LONG SETUP_CreateSerialDeviceList(
|
static LONG SETUP_CreateSerialDeviceList(
|
||||||
DeviceInfoList *list,
|
DeviceInfoList *list,
|
||||||
PCWSTR MachineName,
|
PCWSTR MachineName,
|
||||||
|
@ -1336,7 +1331,7 @@ static LONG SETUP_CreateSerialDeviceList(
|
||||||
devices = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR));
|
devices = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR));
|
||||||
if (!devices)
|
if (!devices)
|
||||||
return ERROR_NO_SYSTEM_RESOURCES;
|
return ERROR_NO_SYSTEM_RESOURCES;
|
||||||
*devices = UNICODE_NULL;
|
*devices = '\0';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1354,7 +1349,7 @@ static LONG SETUP_CreateSerialDeviceList(
|
||||||
/* We have found a device */
|
/* We have found a device */
|
||||||
TRACE("Adding %s to list\n", debugstr_w(ptr));
|
TRACE("Adding %s to list\n", debugstr_w(ptr));
|
||||||
deviceInfo = HeapAlloc(GetProcessHeap(), 0,
|
deviceInfo = HeapAlloc(GetProcessHeap(), 0,
|
||||||
FIELD_OFFSET(DeviceInfo, Interface.Data) + strlenW(ptr) * sizeof(WCHAR) + sizeof(UNICODE_NULL));
|
FIELD_OFFSET(DeviceInfo, Interface.Data) + (strlenW(ptr) + 1) * sizeof(WCHAR));
|
||||||
if (!deviceInfo)
|
if (!deviceInfo)
|
||||||
{
|
{
|
||||||
if (devices != buf)
|
if (devices != buf)
|
||||||
|
@ -1374,7 +1369,7 @@ static LONG SETUP_CreateSerialDeviceList(
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* __WINE__ */
|
#else /* __WINESRC__ */
|
||||||
|
|
||||||
static LONG SETUP_CreateInterfaceList(
|
static LONG SETUP_CreateInterfaceList(
|
||||||
DeviceInfoList *list,
|
DeviceInfoList *list,
|
||||||
|
@ -1438,7 +1433,7 @@ static LONG SETUP_CreateInterfaceList(
|
||||||
RegCloseKey(hInterfaceKey);
|
RegCloseKey(hInterfaceKey);
|
||||||
return ERROR_GEN_FAILURE;
|
return ERROR_GEN_FAILURE;
|
||||||
}
|
}
|
||||||
InstancePath = HeapAlloc(GetProcessHeap(), 0, dwInstancePathLength + sizeof(UNICODE_NULL));
|
InstancePath = HeapAlloc(GetProcessHeap(), 0, dwInstancePathLength + sizeof(WCHAR));
|
||||||
if (!InstancePath)
|
if (!InstancePath)
|
||||||
{
|
{
|
||||||
RegCloseKey(hDeviceInstanceKey);
|
RegCloseKey(hDeviceInstanceKey);
|
||||||
|
@ -1453,7 +1448,7 @@ static LONG SETUP_CreateInterfaceList(
|
||||||
RegCloseKey(hInterfaceKey);
|
RegCloseKey(hInterfaceKey);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
InstancePath[dwInstancePathLength / sizeof(WCHAR)] = UNICODE_NULL;
|
InstancePath[dwInstancePathLength / sizeof(WCHAR)] = '\0';
|
||||||
TRACE("DeviceInstance %s\n", debugstr_w(InstancePath));
|
TRACE("DeviceInstance %s\n", debugstr_w(InstancePath));
|
||||||
|
|
||||||
if (DeviceInstanceW)
|
if (DeviceInstanceW)
|
||||||
|
@ -1495,7 +1490,7 @@ static LONG SETUP_CreateInterfaceList(
|
||||||
RegCloseKey(hInterfaceKey);
|
RegCloseKey(hInterfaceKey);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
dwLength = sizeof(KeyBuffer) - sizeof(UNICODE_NULL);
|
dwLength = sizeof(KeyBuffer) - sizeof(WCHAR);
|
||||||
rc = RegQueryValueExW(hKey, ClassGUID, NULL, NULL, (LPBYTE)KeyBuffer, &dwLength);
|
rc = RegQueryValueExW(hKey, ClassGUID, NULL, NULL, (LPBYTE)KeyBuffer, &dwLength);
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
|
@ -1505,8 +1500,8 @@ static LONG SETUP_CreateInterfaceList(
|
||||||
RegCloseKey(hInterfaceKey);
|
RegCloseKey(hInterfaceKey);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
KeyBuffer[dwLength / sizeof(WCHAR)] = UNICODE_NULL;
|
KeyBuffer[dwLength / sizeof(WCHAR)] = '\0';
|
||||||
KeyBuffer[37] = UNICODE_NULL; /* Replace the } by a NULL character */
|
KeyBuffer[37] = '\0'; /* Replace the } by a NULL character */
|
||||||
if (UuidFromStringW(&KeyBuffer[1], &ClassGuid) != RPC_S_OK)
|
if (UuidFromStringW(&KeyBuffer[1], &ClassGuid) != RPC_S_OK)
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, InstancePath);
|
HeapFree(GetProcessHeap(), 0, InstancePath);
|
||||||
|
@ -1569,7 +1564,7 @@ static LONG SETUP_CreateInterfaceList(
|
||||||
RegCloseKey(hInterfaceKey);
|
RegCloseKey(hInterfaceKey);
|
||||||
return ERROR_GEN_FAILURE;
|
return ERROR_GEN_FAILURE;
|
||||||
}
|
}
|
||||||
deviceInfo = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(DeviceInfo, Interface.Data) + dwInstancePathLength + sizeof(UNICODE_NULL) + dwLength + sizeof(UNICODE_NULL));
|
deviceInfo = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(DeviceInfo, Interface.Data) + dwInstancePathLength + dwLength + 2 * sizeof(WCHAR));
|
||||||
if (!deviceInfo)
|
if (!deviceInfo)
|
||||||
{
|
{
|
||||||
RegCloseKey(hReferenceKey);
|
RegCloseKey(hReferenceKey);
|
||||||
|
@ -1588,7 +1583,7 @@ static LONG SETUP_CreateInterfaceList(
|
||||||
RegCloseKey(hInterfaceKey);
|
RegCloseKey(hInterfaceKey);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
deviceInfo->Interface.pSymbolicLink[dwLength / sizeof(WCHAR)] = UNICODE_NULL;
|
deviceInfo->Interface.pSymbolicLink[dwLength / sizeof(WCHAR)] = '\0';
|
||||||
TRACE("Symbolic link %s\n", debugstr_w(deviceInfo->Interface.pSymbolicLink));
|
TRACE("Symbolic link %s\n", debugstr_w(deviceInfo->Interface.pSymbolicLink));
|
||||||
|
|
||||||
/* Add this entry to the list */
|
/* Add this entry to the list */
|
||||||
|
@ -1607,7 +1602,7 @@ static LONG SETUP_CreateInterfaceList(
|
||||||
RegCloseKey(hInterfaceKey);
|
RegCloseKey(hInterfaceKey);
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
#endif /* __WINE__ */
|
#endif /* __WINESRC__ */
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SetupDiGetClassDevsExW (SETUPAPI.@)
|
* SetupDiGetClassDevsExW (SETUPAPI.@)
|
||||||
|
@ -1682,7 +1677,7 @@ HDEVINFO WINAPI SetupDiGetClassDevsExW(
|
||||||
return INVALID_HANDLE_VALUE;
|
return INVALID_HANDLE_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WINE__
|
#ifdef __WINESRC__
|
||||||
/* Special case: find serial ports by calling QueryDosDevice */
|
/* Special case: find serial ports by calling QueryDosDevice */
|
||||||
if (IsEqualIID(class, &GUID_DEVINTERFACE_COMPORT))
|
if (IsEqualIID(class, &GUID_DEVINTERFACE_COMPORT))
|
||||||
rc = SETUP_CreateSerialDeviceList(list, machine, (LPGUID)class, enumstr);
|
rc = SETUP_CreateSerialDeviceList(list, machine, (LPGUID)class, enumstr);
|
||||||
|
@ -1693,9 +1688,9 @@ HDEVINFO WINAPI SetupDiGetClassDevsExW(
|
||||||
ERR("Wine can only enumerate serial devices at the moment!\n");
|
ERR("Wine can only enumerate serial devices at the moment!\n");
|
||||||
rc = ERROR_INVALID_PARAMETER;
|
rc = ERROR_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
#else /* __WINE__ */
|
#else /* __WINESRC__ */
|
||||||
rc = SETUP_CreateInterfaceList(list, machine, (LPGUID)class, enumstr);
|
rc = SETUP_CreateInterfaceList(list, machine, (LPGUID)class, enumstr);
|
||||||
#endif /* __WINE__ */
|
#endif /* __WINESRC__ */
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
SetLastError(rc);
|
SetLastError(rc);
|
||||||
|
@ -1804,7 +1799,8 @@ BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
|
||||||
ListEntry = RemoveHeadList(&list->ListHead);
|
ListEntry = RemoveHeadList(&list->ListHead);
|
||||||
HeapFree(GetProcessHeap(), 0, ListEntry);
|
HeapFree(GetProcessHeap(), 0, ListEntry);
|
||||||
}
|
}
|
||||||
RegCloseKey(list->HKLM);
|
if (list->HKLM != HKEY_LOCAL_MACHINE)
|
||||||
|
RegCloseKey(list->HKLM);
|
||||||
HeapFree(GetProcessHeap(), 0, list);
|
HeapFree(GetProcessHeap(), 0, list);
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1917,7 +1913,7 @@ BOOL WINAPI SetupDiGetDeviceInterfaceDetailW(
|
||||||
SetLastError(ERROR_INVALID_USER_BUFFER);
|
SetLastError(ERROR_INVALID_USER_BUFFER);
|
||||||
else if (DeviceInterfaceDetailData == NULL && DeviceInterfaceDetailDataSize != 0)
|
else if (DeviceInterfaceDetailData == NULL && DeviceInterfaceDetailDataSize != 0)
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
else if (DeviceInterfaceDetailData != NULL && DeviceInterfaceDetailDataSize < FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_W, DevicePath) + sizeof(UNICODE_NULL))
|
else if (DeviceInterfaceDetailData != NULL && DeviceInterfaceDetailDataSize < FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_W, DevicePath) + sizeof(WCHAR))
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2175,7 +2171,7 @@ BOOL WINAPI SetupDiGetDeviceRegistryPropertyW(
|
||||||
|
|
||||||
case SPDRP_PHYSICAL_DEVICE_OBJECT_NAME:
|
case SPDRP_PHYSICAL_DEVICE_OBJECT_NAME:
|
||||||
{
|
{
|
||||||
DWORD required = wcslen(DevInfo->Device.InstancePath) * sizeof(WCHAR) + sizeof(UNICODE_NULL);
|
DWORD required = (wcslen(DevInfo->Device.InstancePath) + 1) * sizeof(WCHAR);
|
||||||
|
|
||||||
if (PropertyRegDataType)
|
if (PropertyRegDataType)
|
||||||
*PropertyRegDataType = REG_SZ;
|
*PropertyRegDataType = REG_SZ;
|
||||||
|
@ -2531,7 +2527,7 @@ HKEY WINAPI SetupDiOpenClassRegKeyExW(
|
||||||
lpFullGuidString[0] = '{';
|
lpFullGuidString[0] = '{';
|
||||||
memcpy(&lpFullGuidString[1], lpGuidString, dwLength * sizeof(WCHAR));
|
memcpy(&lpFullGuidString[1], lpGuidString, dwLength * sizeof(WCHAR));
|
||||||
lpFullGuidString[dwLength + 1] = '}';
|
lpFullGuidString[dwLength + 1] = '}';
|
||||||
lpFullGuidString[dwLength + 2] = UNICODE_NULL;
|
lpFullGuidString[dwLength + 2] = '\0';
|
||||||
RpcStringFreeW(&lpGuidString);
|
RpcStringFreeW(&lpGuidString);
|
||||||
|
|
||||||
rc = RegOpenKeyExW(hClassesKey,
|
rc = RegOpenKeyExW(hClassesKey,
|
||||||
|
@ -2599,7 +2595,7 @@ BOOL WINAPI SetupDiSetClassInstallParamsA(
|
||||||
* SetupDiCallClassInstaller (SETUPAPI.@)
|
* SetupDiCallClassInstaller (SETUPAPI.@)
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI SetupDiCallClassInstaller(
|
BOOL WINAPI SetupDiCallClassInstaller(
|
||||||
DWORD InstallFunction,
|
DI_FUNCTION InstallFunction,
|
||||||
HDEVINFO DeviceInfoSet,
|
HDEVINFO DeviceInfoSet,
|
||||||
PSP_DEVINFO_DATA DeviceInfoData)
|
PSP_DEVINFO_DATA DeviceInfoData)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue