From 1b6a4f9b4600079e829d5884f768563ed7dea5e5 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 18 Oct 2020 22:38:21 -0500 Subject: Add CompareVersions engine method and expose verutil in Mba.Core. --- src/balutil/BalBootstrapperEngine.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/balutil/BalBootstrapperEngine.cpp') 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 return m_pfnBAEngineProc(BOOTSTRAPPER_ENGINE_MESSAGE_LAUNCHAPPROVEDEXE, &args, &results, m_pvBAEngineProcContext); } + virtual STDMETHODIMP CompareVersions( + __in_z LPCWSTR wzVersion1, + __in_z LPCWSTR wzVersion2, + __out int* pnResult + ) + { + HRESULT hr = S_OK; + BAENGINE_COMPAREVERSIONS_ARGS args = { }; + BAENGINE_COMPAREVERSIONS_RESULTS results = { }; + + ExitOnNull(pnResult, hr, E_INVALIDARG, "pnResult is required"); + + args.cbSize = sizeof(args); + args.wzVersion1 = wzVersion1; + args.wzVersion2 = wzVersion2; + + results.cbSize = sizeof(results); + + hr = m_pfnBAEngineProc(BOOTSTRAPPER_ENGINE_MESSAGE_COMPAREVERSIONS, &args, &results, m_pvBAEngineProcContext); + + *pnResult = results.nResult; + + LExit: + return hr; + } + public: // IMarshal virtual STDMETHODIMP GetUnmarshalClass( __in REFIID /*riid*/, -- cgit v1.2.3-55-g6feb