Browse Source

fix compiler errors

main
Hendrik Langer 6 years ago
parent
commit
ff5fb8b997
  1. BIN
      windows-snapshot-tool/bin/freeze.exe
  2. 1
      windows-snapshot-tool/build/CMakeFiles/Progress/1
  3. 1
      windows-snapshot-tool/build/CMakeFiles/Progress/count.txt
  4. BIN
      windows-snapshot-tool/build/CMakeFiles/freeze.dir/objects.a
  5. BIN
      windows-snapshot-tool/build/CMakeFiles/freeze.dir/src/main.obj
  6. BIN
      windows-snapshot-tool/build/CMakeFiles/freeze.dir/src/resource.res
  7. 50
      windows-snapshot-tool/src/main.cpp

BIN
windows-snapshot-tool/bin/freeze.exe

Binary file not shown.

1
windows-snapshot-tool/build/CMakeFiles/Progress/1

@ -1 +0,0 @@
empty

1
windows-snapshot-tool/build/CMakeFiles/Progress/count.txt

@ -1 +0,0 @@
3

BIN
windows-snapshot-tool/build/CMakeFiles/freeze.dir/objects.a

Binary file not shown.

BIN
windows-snapshot-tool/build/CMakeFiles/freeze.dir/src/main.obj

Binary file not shown.

BIN
windows-snapshot-tool/build/CMakeFiles/freeze.dir/src/resource.res

Binary file not shown.

50
windows-snapshot-tool/src/main.cpp

@ -232,7 +232,7 @@ void InitNotifyIconData()
} }
void getRaspiStorage() { void getRaspiStorage(LPWSTR out) {
// GetLogicalDrives() // GetLogicalDrives()
// for result // for result
// if result.GetDriveType() == DRIVE_REMOVABLE // if result.GetDriveType() == DRIVE_REMOVABLE
@ -245,58 +245,22 @@ void getRaspiStorage() {
if (!GetLogicalDriveStringsW(ARRAYSIZE(myDrives)-1, myDrives)) if (!GetLogicalDriveStringsW(ARRAYSIZE(myDrives)-1, myDrives))
{ {
wprintf(L"GetLogicalDrives() failed with error code: %lu\n", GetLastError()); //wprintf(L"GetLogicalDrives() failed with error code: %lu\n", GetLastError());
return;
} }
else else
{ {
wprintf(L"This machine has the following logical drives:\n");
for (LPWSTR drive = myDrives; *drive != 0; drive += 4) for (LPWSTR drive = myDrives; *drive != 0; drive += 4)
{ {
driveType = GetDriveTypeW(drive); driveType = GetDriveTypeW(drive);
wprintf(L"Drive %s is type %d - ", drive, driveType);
switch (driveType)
{
case DRIVE_UNKNOWN:
wprintf(L"Cannot be determined!");
break;
case DRIVE_NO_ROOT_DIR:
wprintf(L"Invalid root path/Not available.");
break;
case DRIVE_REMOVABLE:
wprintf(L"Removable.");
break;
case DRIVE_FIXED:
wprintf(L"Fixed.");
break;
case DRIVE_REMOTE:
wprintf(L"Network.");
break;
case DRIVE_CDROM:
wprintf(L"CD-ROM.");
break;
case DRIVE_RAMDISK:
wprintf(L"RAMDISK.");
break;
default:
wprintf(L"Unknown value!");
}
wprintf(L"\n");
if (driveType == DRIVE_CDROM) if (driveType == DRIVE_REMOVABLE)
{ {
if (GetVolumeInformationW(drive, volumeName, ARRAYSIZE(volumeName), &serialNumber, &maxComponentLen, &fileSystemFlags, fileSystemName, ARRAYSIZE(fileSystemName))) if (GetVolumeInformationW(drive, volumeName, ARRAYSIZE(volumeName), &serialNumber, &maxComponentLen, &fileSystemFlags, fileSystemName, ARRAYSIZE(fileSystemName)))
{ {
wprintf(L" There is a CD/DVD in the drive:\n"); if (wcscmp(volumeName, L"SCREENSHOTS")) {
wprintf(L" Volume Name: %s\n", volumeName); wcsncpy(drive, out, sizeof(out));
wprintf(L" Serial Number: %08X\n", serialNumber); }
wprintf(L" File System Name: %s\n", fileSystemName);
wprintf(L" Max Component Length: %lu\n", maxComponentLen);
}
else
{
wprintf(L" There is NO CD/DVD in the drive");
} }
} }
} }

Loading…
Cancel
Save