diff options
author | Eric StJohn <ericstj@microsoft.com> | 2021-09-13 13:52:09 -0700 |
---|---|---|
committer | Eric StJohn <ericstj@microsoft.com> | 2021-09-13 13:52:09 -0700 |
commit | fe77e96629575d6cfc16f8a868f13af89c198d13 (patch) | |
tree | baf7d3b6c3bf8982c7b4f2903ccebfb3decaaaa0 /src/libs | |
parent | 495370ff9311d406da9c043cd208ce836a0303ff (diff) | |
download | wix-fe77e96629575d6cfc16f8a868f13af89c198d13.tar.gz wix-fe77e96629575d6cfc16f8a868f13af89c198d13.tar.bz2 wix-fe77e96629575d6cfc16f8a868f13af89c198d13.zip |
Don't set NativeMachine variables when IsWow64Process2 is unavailable
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/dutil/WixToolset.DUtil/procutil.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/procutil.cpp b/src/libs/dutil/WixToolset.DUtil/procutil.cpp index 5cd067f0..a3131b7a 100644 --- a/src/libs/dutil/WixToolset.DUtil/procutil.cpp +++ b/src/libs/dutil/WixToolset.DUtil/procutil.cpp | |||
@@ -124,7 +124,8 @@ extern "C" HRESULT DAPI ProcNativeMachine( | |||
124 | __out USHORT* pusNativeMachine | 124 | __out USHORT* pusNativeMachine |
125 | ) | 125 | ) |
126 | { | 126 | { |
127 | HRESULT hr = S_OK; | 127 | // S_FALSE will indicate that the method is not supported. |
128 | HRESULT hr = S_FALSE; | ||
128 | 129 | ||
129 | typedef BOOL(WINAPI* LPFN_ISWOW64PROCESS2)(HANDLE, USHORT *, USHORT *); | 130 | typedef BOOL(WINAPI* LPFN_ISWOW64PROCESS2)(HANDLE, USHORT *, USHORT *); |
130 | LPFN_ISWOW64PROCESS2 pfnIsWow64Process2 = (LPFN_ISWOW64PROCESS2)::GetProcAddress(::GetModuleHandleW(L"kernel32"), "IsWow64Process2"); | 131 | LPFN_ISWOW64PROCESS2 pfnIsWow64Process2 = (LPFN_ISWOW64PROCESS2)::GetProcAddress(::GetModuleHandleW(L"kernel32"), "IsWow64Process2"); |
@@ -136,6 +137,7 @@ extern "C" HRESULT DAPI ProcNativeMachine( | |||
136 | { | 137 | { |
137 | ExitWithLastError(hr, "Failed to check WOW64 process - IsWow64Process2."); | 138 | ExitWithLastError(hr, "Failed to check WOW64 process - IsWow64Process2."); |
138 | } | 139 | } |
140 | hr = S_OK; | ||
139 | } | 141 | } |
140 | 142 | ||
141 | LExit: | 143 | LExit: |