2 * Copyright 2010 Vicente J. Botet Escriba
3 * Copyright (c) Microsoft Corporation 2014
4 * Copyright 2015 Andrey Semashev
6 * Distributed under the Boost Software License, Version 1.0.
7 * See http://www.boost.org/LICENSE_1_0.txt
10 #ifndef BOOST_WINAPI_SYSTEM_HPP_INCLUDED_
11 #define BOOST_WINAPI_SYSTEM_HPP_INCLUDED_
13 #include <boost/winapi/basic_types.hpp>
15 #ifdef BOOST_HAS_PRAGMA_ONCE
19 #if defined(BOOST_MSVC)
21 // nonstandard extension used : nameless struct/union
22 #pragma warning(disable: 4201)
25 #if !defined( BOOST_USE_WINDOWS_H )
29 #if BOOST_WINAPI_PARTITION_APP_SYSTEM
30 BOOST_SYMBOL_IMPORT boost::winapi::VOID_ WINAPI
31 GetSystemInfo(::_SYSTEM_INFO* lpSystemInfo);
34 #if BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM
35 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP
36 BOOST_SYMBOL_IMPORT boost::winapi::VOID_ WINAPI
37 GetNativeSystemInfo(::_SYSTEM_INFO* lpSystemInfo);
46 typedef struct BOOST_MAY_ALIAS _SYSTEM_INFO {
47 BOOST_WINAPI_DETAIL_EXTENSION union {
49 BOOST_WINAPI_DETAIL_EXTENSION struct {
50 WORD_ wProcessorArchitecture;
55 LPVOID_ lpMinimumApplicationAddress;
56 LPVOID_ lpMaximumApplicationAddress;
57 DWORD_PTR_ dwActiveProcessorMask;
58 DWORD_ dwNumberOfProcessors;
59 DWORD_ dwProcessorType;
60 DWORD_ dwAllocationGranularity;
61 WORD_ wProcessorLevel;
62 WORD_ wProcessorRevision;
63 } SYSTEM_INFO_, *LPSYSTEM_INFO_;
65 #if BOOST_WINAPI_PARTITION_APP_SYSTEM
66 BOOST_FORCEINLINE VOID_ GetSystemInfo(LPSYSTEM_INFO_ lpSystemInfo)
68 ::GetSystemInfo(reinterpret_cast< ::_SYSTEM_INFO* >(lpSystemInfo));
72 #if BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM
73 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP
74 BOOST_FORCEINLINE VOID_ GetNativeSystemInfo(LPSYSTEM_INFO_ lpSystemInfo)
76 ::GetNativeSystemInfo(reinterpret_cast< ::_SYSTEM_INFO* >(lpSystemInfo));
83 #if defined(BOOST_MSVC)
87 #endif // BOOST_WINAPI_SYSTEM_HPP_INCLUDED_