From c9d14eb51e4b8458fd5e2738fcc7d1c1129ad22e Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 18 Oct 2020 22:37:12 -0500 Subject: WIXFEAT:6210 Change data type of versions to strings. --- src/bextutil/BextBundleExtensionEngine.cpp | 14 ++++++++------ src/bextutil/bextutil.vcxproj | 8 ++++---- src/bextutil/inc/IBundleExtensionEngine.h | 5 +++-- src/bextutil/packages.config | 4 ++-- 4 files changed, 17 insertions(+), 14 deletions(-) (limited to 'src/bextutil') diff --git a/src/bextutil/BextBundleExtensionEngine.cpp b/src/bextutil/BextBundleExtensionEngine.cpp index a78b3130..983782a9 100644 --- a/src/bextutil/BextBundleExtensionEngine.cpp +++ b/src/bextutil/BextBundleExtensionEngine.cpp @@ -185,26 +185,28 @@ public: // IBundleExtensionEngine virtual STDMETHODIMP GetVariableVersion( __in_z LPCWSTR wzVariable, - __out DWORD64* pqwValue + __out_ecount_opt(*pcchValue) LPWSTR wzValue, + __inout DWORD* pcchValue ) { HRESULT hr = S_OK; BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS args = { }; BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS results = { }; - ExitOnNull(pqwValue, hr, E_INVALIDARG, "pqwValue is required"); + ExitOnNull(pcchValue, hr, E_INVALIDARG, "pcchValue is required"); args.cbSize = sizeof(args); args.wzVariable = wzVariable; results.cbSize = sizeof(results); + results.wzValue = wzValue; + results.cchValue = *pcchValue; hr = m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLEVERSION, &args, &results, m_pvBundleExtensionEngineProcContext); - *pqwValue = results.qwValue; + *pcchValue = results.cchValue; LExit: - SecureZeroMemory(&results, sizeof(results)); return hr; } @@ -263,7 +265,7 @@ public: // IBundleExtensionEngine virtual STDMETHODIMP SetVariableVersion( __in_z LPCWSTR wzVariable, - __in DWORD64 qwValue + __in_z_opt LPCWSTR wzValue ) { BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS args = { }; @@ -271,7 +273,7 @@ public: // IBundleExtensionEngine args.cbSize = sizeof(args); args.wzVariable = wzVariable; - args.qwValue = qwValue; + args.wzValue = wzValue; results.cbSize = sizeof(results); diff --git a/src/bextutil/bextutil.vcxproj b/src/bextutil/bextutil.vcxproj index c27d8aee..00478a6e 100644 --- a/src/bextutil/bextutil.vcxproj +++ b/src/bextutil/bextutil.vcxproj @@ -2,8 +2,8 @@ - - + + @@ -87,8 +87,8 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + diff --git a/src/bextutil/inc/IBundleExtensionEngine.h b/src/bextutil/inc/IBundleExtensionEngine.h index 7772b016..77ea2770 100644 --- a/src/bextutil/inc/IBundleExtensionEngine.h +++ b/src/bextutil/inc/IBundleExtensionEngine.h @@ -34,7 +34,8 @@ DECLARE_INTERFACE_IID_(IBundleExtensionEngine, IUnknown, "9D027A39-F6B6-42CC-973 STDMETHOD(GetVariableVersion)( __in_z LPCWSTR wzVariable, - __out DWORD64* pqwValue + __out_ecount_opt(*pcchValue) LPWSTR wzValue, + __inout DWORD* pcchValue ) = 0; STDMETHOD(Log)( @@ -55,6 +56,6 @@ DECLARE_INTERFACE_IID_(IBundleExtensionEngine, IUnknown, "9D027A39-F6B6-42CC-973 STDMETHOD(SetVariableVersion)( __in_z LPCWSTR wzVariable, - __in DWORD64 qwValue + __in_z_opt LPCWSTR wzValue ) = 0; }; diff --git a/src/bextutil/packages.config b/src/bextutil/packages.config index 4db0b6a7..be1bf8e2 100644 --- a/src/bextutil/packages.config +++ b/src/bextutil/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file -- cgit v1.2.3-55-g6feb