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/balutil | |
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/balutil')
-rw-r--r-- | src/balutil/BalBootstrapperEngine.cpp | 26 | ||||
-rw-r--r-- | src/balutil/inc/IBootstrapperApplication.h | 2 | ||||
-rw-r--r-- | src/balutil/inc/IBootstrapperEngine.h | 6 |
3 files changed, 33 insertions, 1 deletions
diff --git a/src/balutil/BalBootstrapperEngine.cpp b/src/balutil/BalBootstrapperEngine.cpp index b68ea7c2..8a78b127 100644 --- a/src/balutil/BalBootstrapperEngine.cpp +++ b/src/balutil/BalBootstrapperEngine.cpp | |||
@@ -535,6 +535,32 @@ public: // IBootstrapperEngine | |||
535 | return m_pfnBAEngineProc(BOOTSTRAPPER_ENGINE_MESSAGE_LAUNCHAPPROVEDEXE, &args, &results, m_pvBAEngineProcContext); | 535 | return m_pfnBAEngineProc(BOOTSTRAPPER_ENGINE_MESSAGE_LAUNCHAPPROVEDEXE, &args, &results, m_pvBAEngineProcContext); |
536 | } | 536 | } |
537 | 537 | ||
538 | virtual STDMETHODIMP CompareVersions( | ||
539 | __in_z LPCWSTR wzVersion1, | ||
540 | __in_z LPCWSTR wzVersion2, | ||
541 | __out int* pnResult | ||
542 | ) | ||
543 | { | ||
544 | HRESULT hr = S_OK; | ||
545 | BAENGINE_COMPAREVERSIONS_ARGS args = { }; | ||
546 | BAENGINE_COMPAREVERSIONS_RESULTS results = { }; | ||
547 | |||
548 | ExitOnNull(pnResult, hr, E_INVALIDARG, "pnResult is required"); | ||
549 | |||
550 | args.cbSize = sizeof(args); | ||
551 | args.wzVersion1 = wzVersion1; | ||
552 | args.wzVersion2 = wzVersion2; | ||
553 | |||
554 | results.cbSize = sizeof(results); | ||
555 | |||
556 | hr = m_pfnBAEngineProc(BOOTSTRAPPER_ENGINE_MESSAGE_COMPAREVERSIONS, &args, &results, m_pvBAEngineProcContext); | ||
557 | |||
558 | *pnResult = results.nResult; | ||
559 | |||
560 | LExit: | ||
561 | return hr; | ||
562 | } | ||
563 | |||
538 | public: // IMarshal | 564 | public: // IMarshal |
539 | virtual STDMETHODIMP GetUnmarshalClass( | 565 | virtual STDMETHODIMP GetUnmarshalClass( |
540 | __in REFIID /*riid*/, | 566 | __in REFIID /*riid*/, |
diff --git a/src/balutil/inc/IBootstrapperApplication.h b/src/balutil/inc/IBootstrapperApplication.h index 9cc19120..75ea7bc9 100644 --- a/src/balutil/inc/IBootstrapperApplication.h +++ b/src/balutil/inc/IBootstrapperApplication.h | |||
@@ -396,7 +396,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A | |||
396 | __inout BOOL* pfCancel | 396 | __inout BOOL* pfCancel |
397 | ) = 0; | 397 | ) = 0; |
398 | 398 | ||
399 | // OnExecuteBegin - called when the engine begins executing a package. | 399 | // OnExecutePackageBegin - called when the engine begins executing a package. |
400 | // | 400 | // |
401 | STDMETHOD(OnExecutePackageBegin)( | 401 | STDMETHOD(OnExecutePackageBegin)( |
402 | __in_z LPCWSTR wzPackageId, | 402 | __in_z LPCWSTR wzPackageId, |
diff --git a/src/balutil/inc/IBootstrapperEngine.h b/src/balutil/inc/IBootstrapperEngine.h index cf055102..cd89a9f0 100644 --- a/src/balutil/inc/IBootstrapperEngine.h +++ b/src/balutil/inc/IBootstrapperEngine.h | |||
@@ -127,4 +127,10 @@ DECLARE_INTERFACE_IID_(IBootstrapperEngine, IUnknown, "6480D616-27A0-44D7-905B-8 | |||
127 | __in_z_opt LPCWSTR wzArguments, | 127 | __in_z_opt LPCWSTR wzArguments, |
128 | __in DWORD dwWaitForInputIdleTimeout | 128 | __in DWORD dwWaitForInputIdleTimeout |
129 | ) = 0; | 129 | ) = 0; |
130 | |||
131 | STDMETHOD(CompareVersions)( | ||
132 | __in_z LPCWSTR wzVersion1, | ||
133 | __in_z LPCWSTR wzVersion2, | ||
134 | __out int* pnResult | ||
135 | ) = 0; | ||
130 | }; | 136 | }; |