aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Util/ca
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Util/ca')
-rw-r--r--src/ext/Util/ca/OsInfo.cpp28
-rw-r--r--src/ext/Util/ca/utilca.def1
2 files changed, 29 insertions, 0 deletions
diff --git a/src/ext/Util/ca/OsInfo.cpp b/src/ext/Util/ca/OsInfo.cpp
index 4783673e..eb76a3a0 100644
--- a/src/ext/Util/ca/OsInfo.cpp
+++ b/src/ext/Util/ca/OsInfo.cpp
@@ -485,3 +485,31 @@ LExit:
485 } 485 }
486 return WcaFinalize(er); 486 return WcaFinalize(er);
487} 487}
488
489/********************************************************************
490WixQueryNativeMachine - entry point for WixQueryNativeMachine custom action
491
492 Called as Type 1 custom action (DLL from the Binary table) from
493 Windows Installer to set properties that indicates the native machine architecture
494********************************************************************/
495extern "C" UINT __stdcall WixQueryNativeMachine(
496 __in MSIHANDLE hInstall
497 )
498{
499 HRESULT hr = S_OK;
500 USHORT usNativeMachine = IMAGE_FILE_MACHINE_UNKNOWN;
501 DWORD er = ERROR_SUCCESS;
502
503 hr = WcaInitialize(hInstall, "WixQueryNativeMachine");
504 ExitOnFailure(hr, "WixQueryNativeMachine failed to initialize");
505
506 hr = ::ProcNativeMachine(::GetCurrentProcess(), &usNativeMachine);
507 ExitOnFailure(hr, "Failed to get native machine value.");
508
509 WcaSetIntProperty(L"WIX_NATIVE_MACHINE", usNativeMachine);
510
511LExit:
512 if (FAILED(hr))
513 er = ERROR_INSTALL_FAILURE;
514 return WcaFinalize(er);
515} \ No newline at end of file
diff --git a/src/ext/Util/ca/utilca.def b/src/ext/Util/ca/utilca.def
index 412d86a3..3912ce56 100644
--- a/src/ext/Util/ca/utilca.def
+++ b/src/ext/Util/ca/utilca.def
@@ -22,6 +22,7 @@ EXPORTS
22 WixQueryOsDirs 22 WixQueryOsDirs
23 WixQueryOsWellKnownSID 23 WixQueryOsWellKnownSID
24 WixQueryOsDriverInfo 24 WixQueryOsDriverInfo
25 WixQueryNativeMachine
25; netshortcuts.cpp 26; netshortcuts.cpp
26 WixSchedInternetShortcuts 27 WixSchedInternetShortcuts
27 WixCreateInternetShortcuts 28 WixCreateInternetShortcuts