HKEY AliasesKey;
HRESULT Error;
+ Log("====>");
+
Location = GetProperty(DeviceInfoSet,
DeviceInfoData,
SPDRP_LOCATION_INFORMATION);
free(Location);
+ Log("<====");
+
return TRUE;
fail3:
{
PTCHAR Location;
HKEY InstallerKey;
+ HKEY SubKey;
HRESULT Error;
Log("====>");
goto fail1;
*Name = NULL;
+ InstallerKey = NULL;
+ SubKey = NULL;
Error = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
INSTALLER_KEY,
goto fail2;
}
+ Error = RegOpenKeyEx(InstallerKey,
+ Location,
+ 0,
+ KEY_READ,
+ &SubKey);
+ if (Error != ERROR_SUCCESS) {
+ if (Error == ERROR_FILE_NOT_FOUND)
+ goto done;
+
+ SetLastError(Error);
+ goto fail3;
+ }
+
*Name = Location;
if (strlen(*Name) == 0) {
*Name = NULL;
}
- RegCloseKey(InstallerKey);
-
done:
+ if (SubKey != NULL)
+ RegCloseKey(SubKey);
+
+ if (InstallerKey != NULL)
+ RegCloseKey(InstallerKey);
+
Log("%s", (*Name == NULL) ? "[NONE]" : *Name);
Log("<====");
return TRUE;
+fail3:
+ Log("fail3");
+
+ RegCloseKey(InstallerKey);
+
fail2:
Log("fail2");
DWORD Type;
HRESULT Error;
+ Log("====>");
+
Error = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
SERVICE_KEY(XENNET),
0,
RegCloseKey(ServiceKey);
+ Log("<==== ");
+
return TRUE;
fail5:
goto fail2;
}
+ Success = ClearAliasSoftwareKeyName(DeviceInfoSet,
+ DeviceInfoData);
+ if (!Success)
+ goto fail3;
+
Log("<====");
return NO_ERROR;
+fail3:
+ Log("fail3");
+
fail2:
Log("fail2");
goto fail1;
}
- Success = ClearAliasSoftwareKeyName(DeviceInfoSet,
- DeviceInfoData);
- if (!Success)
- goto fail2;
-
Success = DecrementServiceCount(&Count);
if (!Success)
- goto fail3;
+ goto fail2;
if (Count == 0)
(VOID) RequestReboot(DeviceInfoSet, DeviceInfoData);
return NO_ERROR;
-fail3:
- Log("fail3");
-
fail2:
Log("fail2");