preset in case of failure

svn path=/trunk/; revision=28858
This commit is contained in:
Ged Murphy 2007-09-04 20:28:44 +00:00
parent 60cddd9562
commit cc461f5920

View file

@ -2787,7 +2787,9 @@ SetupDiOpenDeviceInfoW(
goto cleanup; goto cleanup;
} }
ClassGUID = GUID_NULL;
dwSize = MAX_GUID_STRING_LEN * sizeof(WCHAR); dwSize = MAX_GUID_STRING_LEN * sizeof(WCHAR);
if (RegQueryValueExW(hKey, if (RegQueryValueExW(hKey,
REGSTR_VAL_CLASSGUID, REGSTR_VAL_CLASSGUID,
NULL, NULL,
@ -2798,8 +2800,7 @@ SetupDiOpenDeviceInfoW(
szClassGuid[MAX_GUID_STRING_LEN - 2] = UNICODE_NULL; szClassGuid[MAX_GUID_STRING_LEN - 2] = UNICODE_NULL;
/* Convert a string to a ClassGuid */ /* Convert a string to a ClassGuid */
if (UuidFromStringW(&szClassGuid[1], &ClassGUID) != RPC_S_OK) UuidFromStringW(&szClassGuid[1], &ClassGUID);
ClassGUID = GUID_NULL;
} }
if (!CreateDeviceInfoElement(list, DeviceInstanceId, &ClassGUID, &deviceInfo)) if (!CreateDeviceInfoElement(list, DeviceInstanceId, &ClassGUID, &deviceInfo))