From fa393914f12f6d6bc88a73e4d5b009da765f6dd5 Mon Sep 17 00:00:00 2001 From: Jacob Hoover Date: Thu, 10 Nov 2022 10:48:23 -0600 Subject: WIXFEAT-3704 - Allow access to persisted variables from related bundles --- src/burn/engine/EngineForExtension.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/burn/engine/EngineForExtension.cpp') diff --git a/src/burn/engine/EngineForExtension.cpp b/src/burn/engine/EngineForExtension.cpp index 2e1c98fd..bb134a61 100644 --- a/src/burn/engine/EngineForExtension.cpp +++ b/src/burn/engine/EngineForExtension.cpp @@ -203,6 +203,22 @@ LExit: return hr; } +static HRESULT BEEngineGetRelatedBundleVariable( + __in BURN_EXTENSION_ENGINE_CONTEXT* pContext, + __in const LPVOID pvArgs, + __inout LPVOID pvResults +) +{ + HRESULT hr = S_OK; + ValidateMessageArgs(hr, pvArgs, BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS, pArgs); + ValidateMessageResults(hr, pvResults, BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS, pResults); + + hr = ExternalEngineGetRelatedBundleVariable(pContext->pEngineState, pArgs->wzBundleId, pArgs->wzVariable, pResults->wzValue, &pResults->cchValue); + +LExit: + return hr; +} + HRESULT WINAPI EngineForExtensionProc( __in BUNDLE_EXTENSION_ENGINE_MESSAGE message, __in const LPVOID pvArgs, @@ -253,6 +269,9 @@ HRESULT WINAPI EngineForExtensionProc( case BUNDLE_EXTENSION_ENGINE_MESSAGE_COMPAREVERSIONS: hr = BEEngineCompareVersions(pContext, pvArgs, pvResults); break; + case BUNDLE_EXTENSION_ENGINE_MESSAGE_GETRELATEDBUNDLEVARIABLE: + hr = BEEngineGetRelatedBundleVariable(pContext, pvArgs, pvResults); + break; default: hr = E_NOTIMPL; break; -- cgit v1.2.3-55-g6feb