diff options
author | Marc-André Lureau | 2022-02-22 20:40:02 +0100 |
---|---|---|
committer | Paolo Bonzini | 2022-03-15 11:26:20 +0100 |
commit | 872b69e6902f242b651a3cd0ad41bacfa574bdb6 (patch) | |
tree | c689712218ac996a621eb24c045c46c6b0f5c35e /qga | |
parent | meson: fix generic location of vss headers (diff) | |
download | qemu-872b69e6902f242b651a3cd0ad41bacfa574bdb6.tar.gz qemu-872b69e6902f242b651a3cd0ad41bacfa574bdb6.tar.xz qemu-872b69e6902f242b651a3cd0ad41bacfa574bdb6.zip |
qga/vss-win32: check old VSS SDK headers
The VssCoordinator & VssAdmin interfaces have been moved to vsadmin.h in
the Windows SDK.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220222194008.610377-3-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qga')
-rw-r--r-- | qga/vss-win32/install.cpp | 4 | ||||
-rw-r--r-- | qga/vss-win32/provider.cpp | 4 | ||||
-rw-r--r-- | qga/vss-win32/vss-common.h | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp index efc5bb9909..8076efe3cb 100644 --- a/qga/vss-win32/install.cpp +++ b/qga/vss-win32/install.cpp @@ -13,7 +13,11 @@ #include "qemu/osdep.h" #include "vss-common.h" +#ifdef HAVE_VSS_SDK #include <vscoordint.h> +#else +#include <vsadmin.h> +#endif #include "install.h" #include <wbemidl.h> #include <comdef.h> diff --git a/qga/vss-win32/provider.cpp b/qga/vss-win32/provider.cpp index fd187fb66f..1b885e24ee 100644 --- a/qga/vss-win32/provider.cpp +++ b/qga/vss-win32/provider.cpp @@ -12,7 +12,11 @@ #include "qemu/osdep.h" #include "vss-common.h" +#ifdef HAVE_VSS_SDK #include <vscoordint.h> +#else +#include <vsadmin.h> +#endif #include <vsprov.h> #define VSS_TIMEOUT_MSEC (60*1000) diff --git a/qga/vss-win32/vss-common.h b/qga/vss-win32/vss-common.h index 54f8de8c88..0e67e7822c 100644 --- a/qga/vss-win32/vss-common.h +++ b/qga/vss-win32/vss-common.h @@ -64,12 +64,13 @@ const CLSID CLSID_QGAVSSProvider = { 0x6e6a3492, 0x8d4d, 0x440c, const TCHAR g_szClsid[] = TEXT("{6E6A3492-8D4D-440C-9619-5E5D0CC31CA8}"); const TCHAR g_szProgid[] = TEXT("QGAVSSProvider"); +#ifdef HAVE_VSS_SDK /* Enums undefined in VSS SDK 7.2 but defined in newer Windows SDK */ enum __VSS_VOLUME_SNAPSHOT_ATTRIBUTES { VSS_VOLSNAP_ATTR_NO_AUTORECOVERY = 0x00000002, VSS_VOLSNAP_ATTR_TXF_RECOVERY = 0x02000000 }; - +#endif /* COM pointer utility; call ->Release() when it goes out of scope */ template <class T> |