diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-10-18 22:37:12 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-10-24 20:17:06 -0500 |
commit | c9d14eb51e4b8458fd5e2738fcc7d1c1129ad22e (patch) | |
tree | 4d0d29316adce60e5a568806b478fc3e4d88d134 /src/bextutil | |
parent | dcf13e60f0b165a8942e7e7d98f5f0702f7d1e84 (diff) | |
download | wix-c9d14eb51e4b8458fd5e2738fcc7d1c1129ad22e.tar.gz wix-c9d14eb51e4b8458fd5e2738fcc7d1c1129ad22e.tar.bz2 wix-c9d14eb51e4b8458fd5e2738fcc7d1c1129ad22e.zip |
WIXFEAT:6210 Change data type of versions to strings.
Diffstat (limited to 'src/bextutil')
-rw-r--r-- | src/bextutil/BextBundleExtensionEngine.cpp | 14 | ||||
-rw-r--r-- | src/bextutil/bextutil.vcxproj | 8 | ||||
-rw-r--r-- | src/bextutil/inc/IBundleExtensionEngine.h | 5 | ||||
-rw-r--r-- | src/bextutil/packages.config | 4 |
4 files changed, 17 insertions, 14 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 | ||
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 @@ | |||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | 3 | ||
4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.33\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.33\build\WixToolset.BootstrapperCore.Native.props')" /> | 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.37\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.37\build\WixToolset.BootstrapperCore.Native.props')" /> |
6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.51\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.51\build\WixToolset.DUtil.props')" /> | 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.55\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.55\build\WixToolset.DUtil.props')" /> |
7 | 7 | ||
8 | <ItemGroup Label="ProjectConfigurations"> | 8 | <ItemGroup Label="ProjectConfigurations"> |
9 | <ProjectConfiguration Include="Debug|ARM64"> | 9 | <ProjectConfiguration Include="Debug|ARM64"> |
@@ -87,8 +87,8 @@ | |||
87 | <PropertyGroup> | 87 | <PropertyGroup> |
88 | <ErrorText>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}.</ErrorText> | 88 | <ErrorText>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}.</ErrorText> |
89 | </PropertyGroup> | 89 | </PropertyGroup> |
90 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.33\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.33\build\WixToolset.BootstrapperCore.Native.props'))" /> | 90 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.37\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.37\build\WixToolset.BootstrapperCore.Native.props'))" /> |
91 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.51\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.51\build\WixToolset.DUtil.props'))" /> | 91 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.55\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.55\build\WixToolset.DUtil.props'))" /> |
92 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> | 92 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> |
93 | </Target> | 93 | </Target> |
94 | </Project> | 94 | </Project> |
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 | |||
34 | 34 | ||
35 | STDMETHOD(GetVariableVersion)( | 35 | STDMETHOD(GetVariableVersion)( |
36 | __in_z LPCWSTR wzVariable, | 36 | __in_z LPCWSTR wzVariable, |
37 | __out DWORD64* pqwValue | 37 | __out_ecount_opt(*pcchValue) LPWSTR wzValue, |
38 | __inout DWORD* pcchValue | ||
38 | ) = 0; | 39 | ) = 0; |
39 | 40 | ||
40 | STDMETHOD(Log)( | 41 | STDMETHOD(Log)( |
@@ -55,6 +56,6 @@ DECLARE_INTERFACE_IID_(IBundleExtensionEngine, IUnknown, "9D027A39-F6B6-42CC-973 | |||
55 | 56 | ||
56 | STDMETHOD(SetVariableVersion)( | 57 | STDMETHOD(SetVariableVersion)( |
57 | __in_z LPCWSTR wzVariable, | 58 | __in_z LPCWSTR wzVariable, |
58 | __in DWORD64 qwValue | 59 | __in_z_opt LPCWSTR wzValue |
59 | ) = 0; | 60 | ) = 0; |
60 | }; | 61 | }; |
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 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <packages> | 2 | <packages> |
3 | <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" /> | 3 | <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" /> |
4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.33" targetFramework="native" /> | 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.37" targetFramework="native" /> |
5 | <package id="WixToolset.DUtil" version="4.0.51" targetFramework="native" /> | 5 | <package id="WixToolset.DUtil" version="4.0.55" targetFramework="native" /> |
6 | </packages> \ No newline at end of file | 6 | </packages> \ No newline at end of file |