From 1bdf42c558d6923380b9f3ea409027816f972f98 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 18 Jul 2021 19:52:05 -0500 Subject: Refactor butil while cleaning up other things. --- src/libs/dutil/WixToolset.DUtil/inc/butil.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/libs/dutil/WixToolset.DUtil/inc/butil.h') diff --git a/src/libs/dutil/WixToolset.DUtil/inc/butil.h b/src/libs/dutil/WixToolset.DUtil/inc/butil.h index d910c113..721d9ad6 100644 --- a/src/libs/dutil/WixToolset.DUtil/inc/butil.h +++ b/src/libs/dutil/WixToolset.DUtil/inc/butil.h @@ -6,7 +6,7 @@ extern "C" { #endif -typedef enum BUNDLE_INSTALL_CONTEXT +typedef enum _BUNDLE_INSTALL_CONTEXT { BUNDLE_INSTALL_CONTEXT_MACHINE, BUNDLE_INSTALL_CONTEXT_USER, @@ -55,11 +55,29 @@ HRESULT DAPI BundleEnumRelatedBundle( __out_ecount(MAX_GUID_CHARS+1) LPWSTR lpBundleIdBuf ); +/******************************************************************** +BundleGetBundleVariable - Queries the bundle installation metadata for a given variable, + the caller is expected to free the memory returned vis psczValue + +RETURNS: + S_OK + Success, if the variable had a value, it's returned in psczValue + E_INVALIDARG + An invalid parameter was passed to the function. + HRESULT_FROM_WIN32(ERROR_UNKNOWN_PRODUCT) + The bundle is not installed + HRESULT_FROM_WIN32(ERROR_UNKNOWN_PROPERTY) + The variable is unrecognized + E_NOTIMPL: + Tried to read a bundle variable for a type which has not been implemented + + All other returns are unexpected returns from other dutil methods. +********************************************************************/ HRESULT DAPI BundleGetBundleVariable( __in_z LPCWSTR wzBundleId, __in_z LPCWSTR wzVariable, __deref_out_z LPWSTR* psczValue -); + ); #ifdef __cplusplus -- cgit v1.2.3-55-g6feb