1 /* 2 * Copyright 2010 Vicente J. Botet Escriba 3 * Copyright (c) Microsoft Corporation 2014 4 * Copyright 2015 Andrey Semashev 5 * 6 * Distributed under the Boost Software License, Version 1.0. 7 * See http://www.boost.org/LICENSE_1_0.txt 8 */ 9 10 #ifndef BOOST_WINAPI_SYSTEM_HPP_INCLUDED_ 11 #define BOOST_WINAPI_SYSTEM_HPP_INCLUDED_ 12 13 #include <boost/winapi/basic_types.hpp> 14 #include <boost/winapi/detail/header.hpp> 15 16 #ifdef BOOST_HAS_PRAGMA_ONCE 17 #pragma once 18 #endif 19 20 #if !defined( BOOST_USE_WINDOWS_H ) 21 extern "C" { 22 struct _SYSTEM_INFO; 23 24 #if BOOST_WINAPI_PARTITION_APP_SYSTEM 25 BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC 26 GetSystemInfo(::_SYSTEM_INFO* lpSystemInfo); 27 #endif 28 29 #if BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM 30 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP 31 BOOST_WINAPI_IMPORT boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC 32 GetNativeSystemInfo(::_SYSTEM_INFO* lpSystemInfo); 33 #endif 34 #endif 35 } 36 #endif 37 38 namespace boost { 39 namespace winapi { 40 41 typedef struct BOOST_MAY_ALIAS _SYSTEM_INFO { 42 BOOST_WINAPI_DETAIL_EXTENSION union { 43 DWORD_ dwOemId; 44 BOOST_WINAPI_DETAIL_EXTENSION struct { 45 WORD_ wProcessorArchitecture; 46 WORD_ wReserved; 47 }; 48 }; 49 DWORD_ dwPageSize; 50 LPVOID_ lpMinimumApplicationAddress; 51 LPVOID_ lpMaximumApplicationAddress; 52 DWORD_PTR_ dwActiveProcessorMask; 53 DWORD_ dwNumberOfProcessors; 54 DWORD_ dwProcessorType; 55 DWORD_ dwAllocationGranularity; 56 WORD_ wProcessorLevel; 57 WORD_ wProcessorRevision; 58 } SYSTEM_INFO_, *LPSYSTEM_INFO_; 59 60 #if BOOST_WINAPI_PARTITION_APP_SYSTEM GetSystemInfo(LPSYSTEM_INFO_ lpSystemInfo)61BOOST_FORCEINLINE VOID_ GetSystemInfo(LPSYSTEM_INFO_ lpSystemInfo) 62 { 63 ::GetSystemInfo(reinterpret_cast< ::_SYSTEM_INFO* >(lpSystemInfo)); 64 } 65 #endif 66 67 #if BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM 68 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP GetNativeSystemInfo(LPSYSTEM_INFO_ lpSystemInfo)69BOOST_FORCEINLINE VOID_ GetNativeSystemInfo(LPSYSTEM_INFO_ lpSystemInfo) 70 { 71 ::GetNativeSystemInfo(reinterpret_cast< ::_SYSTEM_INFO* >(lpSystemInfo)); 72 } 73 #endif 74 #endif 75 } 76 } 77 78 #include <boost/winapi/detail/footer.hpp> 79 80 #endif // BOOST_WINAPI_SYSTEM_HPP_INCLUDED_ 81