diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-10-18 22:38:21 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-10-24 20:17:06 -0500 |
commit | 1b6a4f9b4600079e829d5884f768563ed7dea5e5 (patch) | |
tree | 7db199ee381f31e675e6a28c248f037dc5f9018d /src/bextutil | |
parent | c9d14eb51e4b8458fd5e2738fcc7d1c1129ad22e (diff) | |
download | wix-1b6a4f9b4600079e829d5884f768563ed7dea5e5.tar.gz wix-1b6a4f9b4600079e829d5884f768563ed7dea5e5.tar.bz2 wix-1b6a4f9b4600079e829d5884f768563ed7dea5e5.zip |
Add CompareVersions engine method and expose verutil in Mba.Core.
Diffstat (limited to 'src/bextutil')
-rw-r--r-- | src/bextutil/BextBundleExtensionEngine.cpp | 26 | ||||
-rw-r--r-- | src/bextutil/inc/IBundleExtensionEngine.h | 6 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/bextutil/BextBundleExtensionEngine.cpp b/src/bextutil/BextBundleExtensionEngine.cpp index 983782a9..9906a7f5 100644 --- a/src/bextutil/BextBundleExtensionEngine.cpp +++ b/src/bextutil/BextBundleExtensionEngine.cpp | |||
@@ -280,6 +280,32 @@ public: // IBundleExtensionEngine | |||
280 | return m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLEVERSION, &args, &results, m_pvBundleExtensionEngineProcContext); | 280 | return m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLEVERSION, &args, &results, m_pvBundleExtensionEngineProcContext); |
281 | } | 281 | } |
282 | 282 | ||
283 | virtual STDMETHODIMP CompareVersions( | ||
284 | __in_z LPCWSTR wzVersion1, | ||
285 | __in_z LPCWSTR wzVersion2, | ||
286 | __out int* pnResult | ||
287 | ) | ||
288 | { | ||
289 | HRESULT hr = S_OK; | ||
290 | BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_ARGS args = { }; | ||
291 | BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_RESULTS results = { }; | ||
292 | |||
293 | ExitOnNull(pnResult, hr, E_INVALIDARG, "pnResult is required"); | ||
294 | |||
295 | args.cbSize = sizeof(args); | ||
296 | args.wzVersion1 = wzVersion1; | ||
297 | args.wzVersion2 = wzVersion2; | ||
298 | |||
299 | results.cbSize = sizeof(results); | ||
300 | |||
301 | hr = m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_COMPAREVERSIONS, &args, &results, m_pvBundleExtensionEngineProcContext); | ||
302 | |||
303 | *pnResult = results.nResult; | ||
304 | |||
305 | LExit: | ||
306 | return hr; | ||
307 | } | ||
308 | |||
283 | public: | 309 | public: |
284 | CBextBundleExtensionEngine( | 310 | CBextBundleExtensionEngine( |
285 | __in PFN_BUNDLE_EXTENSION_ENGINE_PROC pfnBundleExtensionEngineProc, | 311 | __in PFN_BUNDLE_EXTENSION_ENGINE_PROC pfnBundleExtensionEngineProc, |
diff --git a/src/bextutil/inc/IBundleExtensionEngine.h b/src/bextutil/inc/IBundleExtensionEngine.h index 77ea2770..a96e3812 100644 --- a/src/bextutil/inc/IBundleExtensionEngine.h +++ b/src/bextutil/inc/IBundleExtensionEngine.h | |||
@@ -58,4 +58,10 @@ DECLARE_INTERFACE_IID_(IBundleExtensionEngine, IUnknown, "9D027A39-F6B6-42CC-973 | |||
58 | __in_z LPCWSTR wzVariable, | 58 | __in_z LPCWSTR wzVariable, |
59 | __in_z_opt LPCWSTR wzValue | 59 | __in_z_opt LPCWSTR wzValue |
60 | ) = 0; | 60 | ) = 0; |
61 | |||
62 | STDMETHOD(CompareVersions)( | ||
63 | __in_z LPCWSTR wzVersion1, | ||
64 | __in_z LPCWSTR wzVersion2, | ||
65 | __out int* pnResult | ||
66 | ) = 0; | ||
61 | }; | 67 | }; |