[net] Check for application update (part 2)

* factorized token parser and added update file parsing
This commit is contained in:
Pete Batard 2012-11-12 01:53:34 +00:00
parent bc01064678
commit b3ed23647f
7 changed files with 202 additions and 61 deletions

View file

@ -170,7 +170,7 @@ BOOL GetDriveLabel(DWORD DriveIndex, char* letter, char** label)
// to insert media. Use IOCTL_STORAGE_CHECK_VERIFY to prevent this
hPhysical = GetDriveHandle(DriveIndex, NULL, FALSE, FALSE);
if (DeviceIoControl(hPhysical, IOCTL_STORAGE_CHECK_VERIFY, NULL, 0, NULL, 0, &size, NULL))
AutorunLabel = get_token_data(AutorunPath, "label");
AutorunLabel = get_token_data_file("label", AutorunPath);
else if (GetLastError() == ERROR_NOT_READY)
uprintf("Ignoring autorun.inf label for drive %c: %s\n", *letter,
(HRESULT_CODE(GetLastError()) == ERROR_NOT_READY)?"No media":WindowsErrorString());