1 // system.hpp --------------------------------------------------------------//
3 // Copyright 2010 Vicente J. Botet Escriba
4 // Copyright (c) Microsoft Corporation 2014
5 // Copyright 2015 Andrey Semashev
7 // Distributed under the Boost Software License, Version 1.0.
8 // See http://www.boost.org/LICENSE_1_0.txt
11 #ifndef BOOST_DETAIL_WINAPI_SYSTEM_HPP
12 #define BOOST_DETAIL_WINAPI_SYSTEM_HPP
14 #include <boost/detail/winapi/basic_types.hpp>
16 #ifdef BOOST_HAS_PRAGMA_ONCE
20 #if !defined( BOOST_USE_WINDOWS_H )
24 BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
25 GetSystemInfo(::_SYSTEM_INFO* lpSystemInfo);
27 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP
28 BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI
29 GetNativeSystemInfo(::_SYSTEM_INFO* lpSystemInfo);
38 typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SYSTEM_INFO {
42 WORD_ wProcessorArchitecture;
47 LPVOID_ lpMinimumApplicationAddress;
48 LPVOID_ lpMaximumApplicationAddress;
49 DWORD_PTR_ dwActiveProcessorMask;
50 DWORD_ dwNumberOfProcessors;
51 DWORD_ dwProcessorType;
52 DWORD_ dwAllocationGranularity;
53 WORD_ wProcessorLevel;
54 WORD_ wProcessorRevision;
55 } SYSTEM_INFO_, *LPSYSTEM_INFO_;
57 BOOST_FORCEINLINE VOID_ GetSystemInfo(LPSYSTEM_INFO_ lpSystemInfo)
59 ::GetSystemInfo(reinterpret_cast< ::_SYSTEM_INFO* >(lpSystemInfo));
62 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP
63 BOOST_FORCEINLINE VOID_ GetNativeSystemInfo(LPSYSTEM_INFO_ lpSystemInfo)
65 ::GetNativeSystemInfo(reinterpret_cast< ::_SYSTEM_INFO* >(lpSystemInfo));
73 #endif // BOOST_DETAIL_WINAPI_SYSTEM_HPP