diff options
author | Jacob Hoover <jacob.hoover@greenheck.com> | 2022-11-10 10:48:23 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-11-10 23:49:10 -0600 |
commit | fa393914f12f6d6bc88a73e4d5b009da765f6dd5 (patch) | |
tree | 6dbf354d4542b3e085795b0a917eaafc1eead415 /src/api/burn/bextutil/BextBundleExtensionEngine.cpp | |
parent | c843b47d6233153fa961c6d0e61edf7cedf255bb (diff) | |
download | wix-fa393914f12f6d6bc88a73e4d5b009da765f6dd5.tar.gz wix-fa393914f12f6d6bc88a73e4d5b009da765f6dd5.tar.bz2 wix-fa393914f12f6d6bc88a73e4d5b009da765f6dd5.zip |
WIXFEAT-3704 - Allow access to persisted variables from related bundles
Diffstat (limited to 'src/api/burn/bextutil/BextBundleExtensionEngine.cpp')
-rw-r--r-- | src/api/burn/bextutil/BextBundleExtensionEngine.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/api/burn/bextutil/BextBundleExtensionEngine.cpp b/src/api/burn/bextutil/BextBundleExtensionEngine.cpp index 6043e2db..2c854817 100644 --- a/src/api/burn/bextutil/BextBundleExtensionEngine.cpp +++ b/src/api/burn/bextutil/BextBundleExtensionEngine.cpp | |||
@@ -306,6 +306,35 @@ public: // IBundleExtensionEngine | |||
306 | return hr; | 306 | return hr; |
307 | } | 307 | } |
308 | 308 | ||
309 | virtual STDMETHODIMP GetRelatedBundleVariable( | ||
310 | __in_z LPCWSTR wzBundleId, | ||
311 | __in_z LPCWSTR wzVariable, | ||
312 | __out_ecount_opt(*pcchValue) LPWSTR wzValue, | ||
313 | __inout SIZE_T* pcchValue | ||
314 | ) | ||
315 | { | ||
316 | HRESULT hr = S_OK; | ||
317 | BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS args = { }; | ||
318 | BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS results = { }; | ||
319 | |||
320 | ExitOnNull(pcchValue, hr, E_INVALIDARG, "pcchValue is required"); | ||
321 | |||
322 | args.cbSize = sizeof(args); | ||
323 | args.wzBundleId = wzBundleId; | ||
324 | args.wzVariable = wzVariable; | ||
325 | |||
326 | results.cbSize = sizeof(results); | ||
327 | results.wzValue = wzValue; | ||
328 | results.cchValue = *pcchValue; | ||
329 | |||
330 | hr = m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_GETRELATEDBUNDLEVARIABLE, &args, &results, m_pvBundleExtensionEngineProcContext); | ||
331 | |||
332 | *pcchValue = results.cchValue; | ||
333 | |||
334 | LExit: | ||
335 | return hr; | ||
336 | } | ||
337 | |||
309 | public: | 338 | public: |
310 | CBextBundleExtensionEngine( | 339 | CBextBundleExtensionEngine( |
311 | __in PFN_BUNDLE_EXTENSION_ENGINE_PROC pfnBundleExtensionEngineProc, | 340 | __in PFN_BUNDLE_EXTENSION_ENGINE_PROC pfnBundleExtensionEngineProc, |