diff --git a/windows-snapshot-tool/bin/freeze.exe b/windows-snapshot-tool/bin/freeze.exe index d46f7a3..1ed8efe 100755 Binary files a/windows-snapshot-tool/bin/freeze.exe and b/windows-snapshot-tool/bin/freeze.exe differ diff --git a/windows-snapshot-tool/build/CMakeFiles/Progress/1 b/windows-snapshot-tool/build/CMakeFiles/Progress/1 deleted file mode 100644 index 7b4d68d..0000000 --- a/windows-snapshot-tool/build/CMakeFiles/Progress/1 +++ /dev/null @@ -1 +0,0 @@ -empty \ No newline at end of file diff --git a/windows-snapshot-tool/build/CMakeFiles/Progress/count.txt b/windows-snapshot-tool/build/CMakeFiles/Progress/count.txt deleted file mode 100644 index 00750ed..0000000 --- a/windows-snapshot-tool/build/CMakeFiles/Progress/count.txt +++ /dev/null @@ -1 +0,0 @@ -3 diff --git a/windows-snapshot-tool/build/CMakeFiles/freeze.dir/objects.a b/windows-snapshot-tool/build/CMakeFiles/freeze.dir/objects.a new file mode 100644 index 0000000..19e3224 Binary files /dev/null and b/windows-snapshot-tool/build/CMakeFiles/freeze.dir/objects.a differ diff --git a/windows-snapshot-tool/build/CMakeFiles/freeze.dir/src/main.obj b/windows-snapshot-tool/build/CMakeFiles/freeze.dir/src/main.obj new file mode 100644 index 0000000..f1782c3 Binary files /dev/null and b/windows-snapshot-tool/build/CMakeFiles/freeze.dir/src/main.obj differ diff --git a/windows-snapshot-tool/build/CMakeFiles/freeze.dir/src/resource.res b/windows-snapshot-tool/build/CMakeFiles/freeze.dir/src/resource.res new file mode 100644 index 0000000..ca5a6e9 Binary files /dev/null and b/windows-snapshot-tool/build/CMakeFiles/freeze.dir/src/resource.res differ diff --git a/windows-snapshot-tool/src/main.cpp b/windows-snapshot-tool/src/main.cpp index ff878c1..073ed2d 100644 --- a/windows-snapshot-tool/src/main.cpp +++ b/windows-snapshot-tool/src/main.cpp @@ -232,7 +232,7 @@ void InitNotifyIconData() } -void getRaspiStorage() { +void getRaspiStorage(LPWSTR out) { // GetLogicalDrives() // for result // if result.GetDriveType() == DRIVE_REMOVABLE @@ -245,58 +245,22 @@ void getRaspiStorage() { 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 { - wprintf(L"This machine has the following logical drives:\n"); - for (LPWSTR drive = myDrives; *drive != 0; drive += 4) { 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))) { - wprintf(L" There is a CD/DVD in the drive:\n"); - wprintf(L" Volume Name: %s\n", volumeName); - 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"); + if (wcscmp(volumeName, L"SCREENSHOTS")) { + wcsncpy(drive, out, sizeof(out)); + } } } }