#include "setupapi_private.h"
-WINE_DEFAULT_DEBUG_CHANNEL(setupapi);
-
/* Unicode constants */
static const WCHAR BackSlash[] = {'\\',0};
static const WCHAR ClassGUID[] = {'C','l','a','s','s','G','U','I','D',0};
return Result;
}
-#if WIN32_WINNT < 0x0600
+#if _WIN32_WINNT < 0x0600
/* WARNING:
* This code has been copied from advapi32/reg/reg.c,
* so this dll can be tested as is on Windows XP
strcatW(InfFileName, InfDirectory);
/* Read some information from registry, before creating the driver structure */
- hDriverKey = SetupDiOpenDevRegKey(
- DeviceInfoSet,
- DeviceInfoData,
- DICS_FLAG_GLOBAL,
- 0,
- DIREG_DRV,
- KEY_QUERY_VALUE);
+ hDriverKey = SETUPDI_OpenDrvKey(((struct DeviceInfoSet *)DeviceInfoSet)->HKLM, devInfo, KEY_QUERY_VALUE);
if (hDriverKey == INVALID_HANDLE_VALUE)
goto done;
RequiredSize = (len - strlenW(InfFileName)) * sizeof(WCHAR);
}
/* FIXME: Check ExcludeFromSelect list */
DriverAlreadyAdded = FALSE;
- for (DriverRank = 0, currentId = (LPCWSTR)HardwareIDs; !DriverAlreadyAdded && *currentId; currentId += strlenW(currentId) + 1, DriverRank++)
+ if (HardwareIDs)
{
- if (strcmpiW(DeviceId, currentId) == 0)
+ for (DriverRank = 0, currentId = (LPCWSTR)HardwareIDs; !DriverAlreadyAdded && *currentId; currentId += strlenW(currentId) + 1, DriverRank++)
{
- AddDriverToList(
- pDriverListHead,
- DriverType,
- &ClassGuid,
- ContextDevice,
- currentInfFileDetails,
- FullInfFileName,
- ProviderName,
- ManufacturerName,
- currentId,
- DriverDate, DriverVersion,
- DriverRank + (i == 2 ? 0 : 0x1000 + i - 3));
- DriverAlreadyAdded = TRUE;
+ if (strcmpiW(DeviceId, currentId) == 0)
+ {
+ AddDriverToList(
+ pDriverListHead,
+ DriverType,
+ &ClassGuid,
+ ContextDevice,
+ currentInfFileDetails,
+ FullInfFileName,
+ ProviderName,
+ ManufacturerName,
+ currentId,
+ DriverDate, DriverVersion,
+ DriverRank + (i == 2 ? 0 : 0x1000 + i - 3));
+ DriverAlreadyAdded = TRUE;
+ }
}
}
if (CompatibleIDs)