X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fwin32_vss.c;h=914cd9127267a69b215ea0895b8f28e51b4ce82b;hp=6e5d3ebc5f2e21fa9f2882208c203b64be58fa91;hb=0b5d86386923fc8f3fbd511d6e92f99a3d180fdf;hpb=2b4a923a516228931ffad39bafa75cce41340140 diff --git a/src/win32_vss.c b/src/win32_vss.c index 6e5d3ebc..914cd912 100644 --- a/src/win32_vss.c +++ b/src/win32_vss.c @@ -408,6 +408,15 @@ request_vss_snapshot(IVssBackupComponents *vss, wchar_t *volume, return true; } +static bool +is_wow64(void) +{ + BOOL wow64 = FALSE; + if (sizeof(size_t) == 4) + IsWow64Process(GetCurrentProcess(), &wow64); + return wow64; +} + /* * Create a VSS snapshot of the specified @volume. Return the NT namespace path * to the snapshot root directory in @vss_path_ret and a handle to the snapshot @@ -494,8 +503,16 @@ vss_create_snapshot(const wchar_t *source, UNICODE_STRING *vss_path_ret, vss_err: ret = WIMLIB_ERR_SNAPSHOT_FAILURE; - ERROR("A problem occurred while creating a VSS snapshot of \"%ls\".\n" - " Aborting the operation.", volume); + if (is_wow64()) { + ERROR("64-bit Windows doesn't allow 32-bit applications to " + "create VSS snapshots.\n" + " Run the 64-bit version of this application " + "instead."); + } else { + ERROR("A problem occurred while creating a VSS snapshot of " + "\"%ls\".\n" + " Aborting the operation.", volume); + } err: if (snapshot) vss_delete_snapshot(&snapshot->base);