aboutsummaryrefslogtreecommitdiff
path: root/src/bextutil/BextBundleExtensionEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bextutil/BextBundleExtensionEngine.cpp')
-rw-r--r--src/bextutil/BextBundleExtensionEngine.cpp14
1 files changed, 8 insertions, 6 deletions
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
185 185
186 virtual STDMETHODIMP GetVariableVersion( 186 virtual STDMETHODIMP GetVariableVersion(
187 __in_z LPCWSTR wzVariable, 187 __in_z LPCWSTR wzVariable,
188 __out DWORD64* pqwValue 188 __out_ecount_opt(*pcchValue) LPWSTR wzValue,
189 __inout DWORD* pcchValue
189 ) 190 )
190 { 191 {
191 HRESULT hr = S_OK; 192 HRESULT hr = S_OK;
192 BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS args = { }; 193 BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS args = { };
193 BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS results = { }; 194 BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS results = { };
194 195
195 ExitOnNull(pqwValue, hr, E_INVALIDARG, "pqwValue is required"); 196 ExitOnNull(pcchValue, hr, E_INVALIDARG, "pcchValue is required");
196 197
197 args.cbSize = sizeof(args); 198 args.cbSize = sizeof(args);
198 args.wzVariable = wzVariable; 199 args.wzVariable = wzVariable;
199 200
200 results.cbSize = sizeof(results); 201 results.cbSize = sizeof(results);
202 results.wzValue = wzValue;
203 results.cchValue = *pcchValue;
201 204
202 hr = m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLEVERSION, &args, &results, m_pvBundleExtensionEngineProcContext); 205 hr = m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLEVERSION, &args, &results, m_pvBundleExtensionEngineProcContext);
203 206
204 *pqwValue = results.qwValue; 207 *pcchValue = results.cchValue;
205 208
206 LExit: 209 LExit:
207 SecureZeroMemory(&results, sizeof(results));
208 return hr; 210 return hr;
209 } 211 }
210 212
@@ -263,7 +265,7 @@ public: // IBundleExtensionEngine
263 265
264 virtual STDMETHODIMP SetVariableVersion( 266 virtual STDMETHODIMP SetVariableVersion(
265 __in_z LPCWSTR wzVariable, 267 __in_z LPCWSTR wzVariable,
266 __in DWORD64 qwValue 268 __in_z_opt LPCWSTR wzValue
267 ) 269 )
268 { 270 {
269 BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS args = { }; 271 BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS args = { };
@@ -271,7 +273,7 @@ public: // IBundleExtensionEngine
271 273
272 args.cbSize = sizeof(args); 274 args.cbSize = sizeof(args);
273 args.wzVariable = wzVariable; 275 args.wzVariable = wzVariable;
274 args.qwValue = qwValue; 276 args.wzValue = wzValue;
275 277
276 results.cbSize = sizeof(results); 278 results.cbSize = sizeof(results);
277 279