aboutsummaryrefslogtreecommitdiff
path: root/src/libs
diff options
context:
space:
mode:
authorEric StJohn <ericstj@microsoft.com>2021-09-13 13:52:09 -0700
committerEric StJohn <ericstj@microsoft.com>2021-09-13 13:52:09 -0700
commitfe77e96629575d6cfc16f8a868f13af89c198d13 (patch)
treebaf7d3b6c3bf8982c7b4f2903ccebfb3decaaaa0 /src/libs
parent495370ff9311d406da9c043cd208ce836a0303ff (diff)
downloadwix-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.cpp4
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
141LExit: 143LExit: