From 7099dd38ab902e7fb92706314fa8710a34f165a5 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 28 Apr 2021 16:43:23 -0500 Subject: size_t-ify BootstrapperEngine.h and BundleExtensionEngine.h --- .../inc/BootstrapperEngine.h | 8 ++++---- .../inc/BundleExtensionEngine.h | 8 ++++---- src/engine/burnextension.cpp | 2 +- src/engine/externalengine.cpp | 14 +++++++------- src/engine/externalengine.h | 8 ++++---- src/engine/userexperience.cpp | 2 +- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h b/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h index 0a974563..f6804733 100644 --- a/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h +++ b/src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h @@ -183,7 +183,7 @@ typedef struct _BAENGINE_ESCAPESTRING_RESULTS DWORD cbSize; LPWSTR wzOut; // Should be initialized to the size of wzOut. - DWORD cchOut; + SIZE_T cchOut; } BAENGINE_ESCAPESTRING_RESULTS; typedef struct _BAENGINE_EVALUATECONDITION_ARGS @@ -209,7 +209,7 @@ typedef struct _BAENGINE_FORMATSTRING_RESULTS DWORD cbSize; LPWSTR wzOut; // Should be initialized to the size of wzOut. - DWORD cchOut; + SIZE_T cchOut; } BAENGINE_FORMATSTRING_RESULTS; typedef struct _BAENGINE_GETPACKAGECOUNT_ARGS @@ -246,7 +246,7 @@ typedef struct _BAENGINE_GETVARIABLESTRING_RESULTS DWORD cbSize; LPWSTR wzValue; // Should be initialized to the size of wzValue. - DWORD cchValue; + SIZE_T cchValue; } BAENGINE_GETVARIABLESTRING_RESULTS; typedef struct _BAENGINE_GETVARIABLEVERSION_ARGS @@ -260,7 +260,7 @@ typedef struct _BAENGINE_GETVARIABLEVERSION_RESULTS DWORD cbSize; LPWSTR wzValue; // Should be initialized to the size of wzValue. - DWORD cchValue; + SIZE_T cchValue; } BAENGINE_GETVARIABLEVERSION_RESULTS; typedef struct _BAENGINE_LAUNCHAPPROVEDEXE_ARGS diff --git a/src/WixToolset.BootstrapperCore.Native/inc/BundleExtensionEngine.h b/src/WixToolset.BootstrapperCore.Native/inc/BundleExtensionEngine.h index 003ff635..b397ec16 100644 --- a/src/WixToolset.BootstrapperCore.Native/inc/BundleExtensionEngine.h +++ b/src/WixToolset.BootstrapperCore.Native/inc/BundleExtensionEngine.h @@ -54,7 +54,7 @@ typedef struct _BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_RESULTS DWORD cbSize; LPWSTR wzOut; // Should be initialized to the size of wzOut. - DWORD cchOut; + SIZE_T cchOut; } BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_RESULTS; typedef struct _BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_ARGS @@ -80,7 +80,7 @@ typedef struct _BUNDLE_EXTENSION_ENGINE_FORMATSTRING_RESULTS DWORD cbSize; LPWSTR wzOut; // Should be initialized to the size of wzOut. - DWORD cchOut; + SIZE_T cchOut; } BUNDLE_EXTENSION_ENGINE_FORMATSTRING_RESULTS; typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS @@ -106,7 +106,7 @@ typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS DWORD cbSize; LPWSTR wzValue; // Should be initialized to the size of wzValue. - DWORD cchValue; + SIZE_T cchValue; } BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS; typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS @@ -120,7 +120,7 @@ typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS DWORD cbSize; LPWSTR wzValue; // Should be initialized to the size of wzValue. - DWORD cchValue; + SIZE_T cchValue; } BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS; typedef struct _BUNDLE_EXTENSION_ENGINE_LOG_ARGS diff --git a/src/engine/burnextension.cpp b/src/engine/burnextension.cpp index 7568f75e..475df1c5 100644 --- a/src/engine/burnextension.cpp +++ b/src/engine/burnextension.cpp @@ -134,7 +134,7 @@ EXTERN_C HRESULT BurnExtensionLoad( args.cbSize = sizeof(BUNDLE_EXTENSION_CREATE_ARGS); args.pfnBundleExtensionEngineProc = EngineForExtensionProc; args.pvBundleExtensionEngineProcContext = pEngineContext; - args.qwEngineAPIVersion = MAKEQWORDVERSION(2020, 8, 31, 0); + args.qwEngineAPIVersion = MAKEQWORDVERSION(2021, 4, 27, 0); args.wzBootstrapperWorkingFolder = pEngineContext->pEngineState->userExperience.sczTempDirectory; args.wzBundleExtensionDataPath = sczBundleExtensionDataPath; args.wzExtensionId = pExtension->sczId; diff --git a/src/engine/externalengine.cpp b/src/engine/externalengine.cpp index 63177722..51a0e229 100644 --- a/src/engine/externalengine.cpp +++ b/src/engine/externalengine.cpp @@ -6,7 +6,7 @@ static HRESULT CopyStringToExternal( __in_z LPWSTR wzValue, __in_z_opt LPWSTR wzBuffer, - __inout DWORD* pcchBuffer + __inout SIZE_T* pcchBuffer ); // function definitions @@ -44,7 +44,7 @@ HRESULT ExternalEngineGetVariableString( __in BURN_ENGINE_STATE* pEngineState, __in_z LPCWSTR wzVariable, __out_ecount_opt(*pcchValue) LPWSTR wzValue, - __inout DWORD* pcchValue + __inout SIZE_T* pcchValue ) { HRESULT hr = S_OK; @@ -72,7 +72,7 @@ HRESULT ExternalEngineGetVariableVersion( __in BURN_ENGINE_STATE* pEngineState, __in_z LPCWSTR wzVariable, __out_ecount_opt(*pcchValue) LPWSTR wzValue, - __inout DWORD* pcchValue + __inout SIZE_T* pcchValue ) { HRESULT hr = S_OK; @@ -100,7 +100,7 @@ HRESULT ExternalEngineFormatString( __in BURN_ENGINE_STATE* pEngineState, __in_z LPCWSTR wzIn, __out_ecount_opt(*pcchOut) LPWSTR wzOut, - __inout DWORD* pcchOut + __inout SIZE_T* pcchOut ) { HRESULT hr = S_OK; @@ -127,7 +127,7 @@ HRESULT ExternalEngineFormatString( HRESULT ExternalEngineEscapeString( __in_z LPCWSTR wzIn, __out_ecount_opt(*pcchOut) LPWSTR wzOut, - __inout DWORD* pcchOut + __inout SIZE_T* pcchOut ) { HRESULT hr = S_OK; @@ -771,7 +771,7 @@ LExit: static HRESULT CopyStringToExternal( __in_z LPWSTR wzValue, __in_z_opt LPWSTR wzBuffer, - __inout DWORD* pcchBuffer + __inout SIZE_T* pcchBuffer ) { HRESULT hr = S_OK; @@ -788,7 +788,7 @@ static HRESULT CopyStringToExternal( if (fTooSmall) { - hr = ::StringCchLengthW(wzValue, STRSAFE_MAX_CCH, reinterpret_cast(pcchBuffer)); + hr = ::StringCchLengthW(wzValue, STRSAFE_MAX_LENGTH, reinterpret_cast(pcchBuffer)); if (SUCCEEDED(hr)) { hr = E_MOREDATA; diff --git a/src/engine/externalengine.h b/src/engine/externalengine.h index a007e5b2..2903615d 100644 --- a/src/engine/externalengine.h +++ b/src/engine/externalengine.h @@ -26,27 +26,27 @@ HRESULT ExternalEngineGetVariableString( __in BURN_ENGINE_STATE* pEngineState, __in_z LPCWSTR wzVariable, __out_ecount_opt(*pcchValue) LPWSTR wzValue, - __inout DWORD* pcchValue + __inout SIZE_T* pcchValue ); HRESULT ExternalEngineGetVariableVersion( __in BURN_ENGINE_STATE* pEngineState, __in_z LPCWSTR wzVariable, __out_ecount_opt(*pcchValue) LPWSTR wzValue, - __inout DWORD* pcchValue + __inout SIZE_T* pcchValue ); HRESULT ExternalEngineFormatString( __in BURN_ENGINE_STATE* pEngineState, __in_z LPCWSTR wzIn, __out_ecount_opt(*pcchOut) LPWSTR wzOut, - __inout DWORD* pcchOut + __inout SIZE_T* pcchOut ); HRESULT ExternalEngineEscapeString( __in_z LPCWSTR wzIn, __out_ecount_opt(*pcchOut) LPWSTR wzOut, - __inout DWORD* pcchOut + __inout SIZE_T* pcchOut ); HRESULT ExternalEngineEvaluateCondition( diff --git a/src/engine/userexperience.cpp b/src/engine/userexperience.cpp index 7e68d664..ab631951 100644 --- a/src/engine/userexperience.cpp +++ b/src/engine/userexperience.cpp @@ -111,7 +111,7 @@ extern "C" HRESULT UserExperienceLoad( args.pCommand = pCommand; args.pfnBootstrapperEngineProc = EngineForApplicationProc; args.pvBootstrapperEngineProcContext = pEngineContext; - args.qwEngineAPIVersion = MAKEQWORDVERSION(2021, 4, 14, 0); + args.qwEngineAPIVersion = MAKEQWORDVERSION(2021, 4, 27, 0); results.cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS); -- cgit v1.2.3-55-g6feb