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