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/EngineForApplication.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/burn/engine/EngineForApplication.cpp') diff --git a/src/burn/engine/EngineForApplication.cpp b/src/burn/engine/EngineForApplication.cpp index 45bfaf83..eb77cc50 100644 --- a/src/burn/engine/EngineForApplication.cpp +++ b/src/burn/engine/EngineForApplication.cpp @@ -427,6 +427,22 @@ LExit: return hr; } +static HRESULT BAEngineGetRelatedBundleVariable( + __in BOOTSTRAPPER_ENGINE_CONTEXT* pContext, + __in const LPVOID pvArgs, + __inout LPVOID pvResults + ) +{ + HRESULT hr = S_OK; + ValidateMessageArgs(hr, pvArgs, BAENGINE_GETRELATEDBUNDLEVARIABLE_ARGS, pArgs); + ValidateMessageResults(hr, pvResults, BAENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS, pResults); + + hr = ExternalEngineGetRelatedBundleVariable(pContext->pEngineState, pArgs->wzBundleId, pArgs->wzVariable, pResults->wzValue, &pResults->cchValue); + +LExit: + return hr; +} + HRESULT WINAPI EngineForApplicationProc( __in BOOTSTRAPPER_ENGINE_MESSAGE message, __in const LPVOID pvArgs, @@ -519,6 +535,9 @@ HRESULT WINAPI EngineForApplicationProc( case BOOTSTRAPPER_ENGINE_MESSAGE_COMPAREVERSIONS: hr = BAEngineCompareVersions(pContext, pvArgs, pvResults); break; + case BOOTSTRAPPER_ENGINE_MESSAGE_GETRELATEDBUNDLEVARIABLE: + hr = BAEngineGetRelatedBundleVariable(pContext, pvArgs, pvResults); + break; default: hr = E_NOTIMPL; break; -- cgit v1.2.3-55-g6feb