summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2010-02-15 15:07:47 +0100
committerVladimir Glazunov <vg@openoffice.org>2010-02-15 15:07:47 +0100
commit919bd854d2257cfdbeaeb4e086f83fa8409f8e58 (patch)
tree2d581bc19707ee11988650ba6b474d6005280eda /desktop
parentd0ba772044bce89644839e9eb2451f67045fd057 (diff)
parent66e9fff8d67cfbea50eb84badf1340e558600649 (diff)
CWS-TOOLING: integrate CWS dv17
Diffstat (limited to 'desktop')
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/setup/setup.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/desktop/win32/source/setup/setup.cpp b/desktop/win32/source/setup/setup.cpp
index c51dcd105bfd..6a43f20ebb22 100644..100755
--- a/desktop/win32/source/setup/setup.cpp
+++ b/desktop/win32/source/setup/setup.cpp
@@ -1981,7 +1981,30 @@ boolean SetupAppX::InstallRuntimes()
TCHAR *sRuntimePath = 0;
SYSTEM_INFO siSysInfo;
- GetNativeSystemInfo(&siSysInfo);
+ HMODULE hKernel32 = ::LoadLibrary(_T("Kernel32.dll"));
+ if ( hKernel32 != NULL )
+ {
+ typedef void (CALLBACK* pfnGetNativeSystemInfo_t)(LPSYSTEM_INFO);
+ pfnGetNativeSystemInfo_t pfnGetNativeSystemInfo;
+ pfnGetNativeSystemInfo = (pfnGetNativeSystemInfo_t)::GetProcAddress(hKernel32, "GetNativeSystemInfo");
+ if ( pfnGetNativeSystemInfo != NULL )
+ {
+ pfnGetNativeSystemInfo(&siSysInfo);
+ }
+ else
+ {
+ // GetNativeSystemInfo does not exist. Maybe the code is running under Windows 2000.
+ // Use GetSystemInfo instead.
+ GetSystemInfo(&siSysInfo);
+ }
+ FreeLibrary(hKernel32);
+ }
+ else
+ {
+ // Failed to check Kernel32.dll. There may be something wrong.
+ // Use GetSystemInfo instead anyway.
+ GetSystemInfo(&siSysInfo);
+ }
OutputDebugStringFormat( TEXT( "found architecture<%d>\r\n" ), siSysInfo.wProcessorArchitecture );