@joebigelow / wix-1 / commits / 7099dd38

size_t-ify BootstrapperEngine.h and BundleExtensionEngine.h

Sean Hall committed Apr 28, 2021 at 16:43 UTC 7099dd38ab902e7fb92706314fa8710a34f165a5
6 files changed +21 -21
src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h
+4 -4
@@ -183,7 +183,7 @@ typedef struct _BAENGINE_ESCAPESTRING_RESULTS
183 DWORD cbSize;
184 LPWSTR wzOut;
185 // Should be initialized to the size of wzOut.
186 - DWORD cchOut;
186 + SIZE_T cchOut;
187 } BAENGINE_ESCAPESTRING_RESULTS;
188
189 typedef struct _BAENGINE_EVALUATECONDITION_ARGS
@@ -209,7 +209,7 @@ typedef struct _BAENGINE_FORMATSTRING_RESULTS
209 DWORD cbSize;
210 LPWSTR wzOut;
211 // Should be initialized to the size of wzOut.
212 - DWORD cchOut;
212 + SIZE_T cchOut;
213 } BAENGINE_FORMATSTRING_RESULTS;
214
215 typedef struct _BAENGINE_GETPACKAGECOUNT_ARGS
@@ -246,7 +246,7 @@ typedef struct _BAENGINE_GETVARIABLESTRING_RESULTS
246 DWORD cbSize;
247 LPWSTR wzValue;
248 // Should be initialized to the size of wzValue.
249 - DWORD cchValue;
249 + SIZE_T cchValue;
250 } BAENGINE_GETVARIABLESTRING_RESULTS;
251
252 typedef struct _BAENGINE_GETVARIABLEVERSION_ARGS
@@ -260,7 +260,7 @@ typedef struct _BAENGINE_GETVARIABLEVERSION_RESULTS
260 DWORD cbSize;
261 LPWSTR wzValue;
262 // Should be initialized to the size of wzValue.
263 - DWORD cchValue;
263 + SIZE_T cchValue;
264 } BAENGINE_GETVARIABLEVERSION_RESULTS;
265
266 typedef struct _BAENGINE_LAUNCHAPPROVEDEXE_ARGS
src/WixToolset.BootstrapperCore.Native/inc/BundleExtensionEngine.h
+4 -4
@@ -54,7 +54,7 @@ typedef struct _BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_RESULTS
54 DWORD cbSize;
55 LPWSTR wzOut;
56 // Should be initialized to the size of wzOut.
57 - DWORD cchOut;
57 + SIZE_T cchOut;
58 } BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_RESULTS;
59
60 typedef struct _BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_ARGS
@@ -80,7 +80,7 @@ typedef struct _BUNDLE_EXTENSION_ENGINE_FORMATSTRING_RESULTS
80 DWORD cbSize;
81 LPWSTR wzOut;
82 // Should be initialized to the size of wzOut.
83 - DWORD cchOut;
83 + SIZE_T cchOut;
84 } BUNDLE_EXTENSION_ENGINE_FORMATSTRING_RESULTS;
85
86 typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS
@@ -106,7 +106,7 @@ typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS
106 DWORD cbSize;
107 LPWSTR wzValue;
108 // Should be initialized to the size of wzValue.
109 - DWORD cchValue;
109 + SIZE_T cchValue;
110 } BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS;
111
112 typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS
@@ -120,7 +120,7 @@ typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS
120 DWORD cbSize;
121 LPWSTR wzValue;
122 // Should be initialized to the size of wzValue.
123 - DWORD cchValue;
123 + SIZE_T cchValue;
124 } BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS;
125
126 typedef struct _BUNDLE_EXTENSION_ENGINE_LOG_ARGS
src/engine/burnextension.cpp
+1 -1
@@ -134,7 +134,7 @@ EXTERN_C HRESULT BurnExtensionLoad(
134 args.cbSize = sizeof(BUNDLE_EXTENSION_CREATE_ARGS);
135 args.pfnBundleExtensionEngineProc = EngineForExtensionProc;
136 args.pvBundleExtensionEngineProcContext = pEngineContext;
137 - args.qwEngineAPIVersion = MAKEQWORDVERSION(2020, 8, 31, 0);
137 + args.qwEngineAPIVersion = MAKEQWORDVERSION(2021, 4, 27, 0);
138 args.wzBootstrapperWorkingFolder = pEngineContext->pEngineState->userExperience.sczTempDirectory;
139 args.wzBundleExtensionDataPath = sczBundleExtensionDataPath;
140 args.wzExtensionId = pExtension->sczId;
src/engine/externalengine.cpp
+7 -7
@@ -6,7 +6,7 @@
6 static HRESULT CopyStringToExternal(
7 __in_z LPWSTR wzValue,
8 __in_z_opt LPWSTR wzBuffer,
9 - __inout DWORD* pcchBuffer
9 + __inout SIZE_T* pcchBuffer
10 );
11
12 // function definitions
@@ -44,7 +44,7 @@ HRESULT ExternalEngineGetVariableString(
44 __in BURN_ENGINE_STATE* pEngineState,
45 __in_z LPCWSTR wzVariable,
46 __out_ecount_opt(*pcchValue) LPWSTR wzValue,
47 - __inout DWORD* pcchValue
47 + __inout SIZE_T* pcchValue
48 )
49 {
50 HRESULT hr = S_OK;
@@ -72,7 +72,7 @@ HRESULT ExternalEngineGetVariableVersion(
72 __in BURN_ENGINE_STATE* pEngineState,
73 __in_z LPCWSTR wzVariable,
74 __out_ecount_opt(*pcchValue) LPWSTR wzValue,
75 - __inout DWORD* pcchValue
75 + __inout SIZE_T* pcchValue
76 )
77 {
78 HRESULT hr = S_OK;
@@ -100,7 +100,7 @@ HRESULT ExternalEngineFormatString(
100 __in BURN_ENGINE_STATE* pEngineState,
101 __in_z LPCWSTR wzIn,
102 __out_ecount_opt(*pcchOut) LPWSTR wzOut,
103 - __inout DWORD* pcchOut
103 + __inout SIZE_T* pcchOut
104 )
105 {
106 HRESULT hr = S_OK;
@@ -127,7 +127,7 @@ HRESULT ExternalEngineFormatString(
127 HRESULT ExternalEngineEscapeString(
128 __in_z LPCWSTR wzIn,
129 __out_ecount_opt(*pcchOut) LPWSTR wzOut,
130 - __inout DWORD* pcchOut
130 + __inout SIZE_T* pcchOut
131 )
132 {
133 HRESULT hr = S_OK;
@@ -771,7 +771,7 @@ LExit:
771 static HRESULT CopyStringToExternal(
772 __in_z LPWSTR wzValue,
773 __in_z_opt LPWSTR wzBuffer,
774 - __inout DWORD* pcchBuffer
774 + __inout SIZE_T* pcchBuffer
775 )
776 {
777 HRESULT hr = S_OK;
@@ -788,7 +788,7 @@ static HRESULT CopyStringToExternal(
788
789 if (fTooSmall)
790 {
791 - hr = ::StringCchLengthW(wzValue, STRSAFE_MAX_CCH, reinterpret_cast<size_t*>(pcchBuffer));
791 + hr = ::StringCchLengthW(wzValue, STRSAFE_MAX_LENGTH, reinterpret_cast<size_t*>(pcchBuffer));
792 if (SUCCEEDED(hr))
793 {
794 hr = E_MOREDATA;
src/engine/externalengine.h
+4 -4
@@ -26,27 +26,27 @@ HRESULT ExternalEngineGetVariableString(
26 __in BURN_ENGINE_STATE* pEngineState,
27 __in_z LPCWSTR wzVariable,
28 __out_ecount_opt(*pcchValue) LPWSTR wzValue,
29 - __inout DWORD* pcchValue
29 + __inout SIZE_T* pcchValue
30 );
31
32 HRESULT ExternalEngineGetVariableVersion(
33 __in BURN_ENGINE_STATE* pEngineState,
34 __in_z LPCWSTR wzVariable,
35 __out_ecount_opt(*pcchValue) LPWSTR wzValue,
36 - __inout DWORD* pcchValue
36 + __inout SIZE_T* pcchValue
37 );
38
39 HRESULT ExternalEngineFormatString(
40 __in BURN_ENGINE_STATE* pEngineState,
41 __in_z LPCWSTR wzIn,
42 __out_ecount_opt(*pcchOut) LPWSTR wzOut,
43 - __inout DWORD* pcchOut
43 + __inout SIZE_T* pcchOut
44 );
45
46 HRESULT ExternalEngineEscapeString(
47 __in_z LPCWSTR wzIn,
48 __out_ecount_opt(*pcchOut) LPWSTR wzOut,
49 - __inout DWORD* pcchOut
49 + __inout SIZE_T* pcchOut
50 );
51
52 HRESULT ExternalEngineEvaluateCondition(
src/engine/userexperience.cpp
+1 -1
@@ -111,7 +111,7 @@ extern "C" HRESULT UserExperienceLoad(
111 args.pCommand = pCommand;
112 args.pfnBootstrapperEngineProc = EngineForApplicationProc;
113 args.pvBootstrapperEngineProcContext = pEngineContext;
114 - args.qwEngineAPIVersion = MAKEQWORDVERSION(2021, 4, 14, 0);
114 + args.qwEngineAPIVersion = MAKEQWORDVERSION(2021, 4, 27, 0);
115
116 results.cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS);
117