81 lines
2.2 KiB
C++
81 lines
2.2 KiB
C++
/*
|
|
* Copyright 2010 Vicente J. Botet Escriba
|
|
* Copyright (c) Microsoft Corporation 2014
|
|
* Copyright 2015 Andrey Semashev
|
|
*
|
|
* Distributed under the Boost Software License, Version 1.0.
|
|
* See http://www.boost.org/LICENSE_1_0.txt
|
|
*/
|
|
|
|
#ifndef ACTIV_BOOST_WINAPI_SYSTEM_HPP_INCLUDED_
|
|
#define ACTIV_BOOST_WINAPI_SYSTEM_HPP_INCLUDED_
|
|
|
|
#include <ActivBoost/winapi/basic_types.hpp>
|
|
#include <ActivBoost/winapi/detail/header.hpp>
|
|
|
|
#ifdef ACTIV_BOOST_HAS_PRAGMA_ONCE
|
|
#pragma once
|
|
#endif
|
|
|
|
#if !defined( ACTIV_BOOST_USE_WINDOWS_H )
|
|
extern "C" {
|
|
struct _SYSTEM_INFO;
|
|
|
|
#if ACTIV_BOOST_WINAPI_PARTITION_APP_SYSTEM
|
|
ACTIV_BOOST_WINAPI_IMPORT_EXCEPT_WM Boost::winapi::VOID_ ACTIV_BOOST_WINAPI_WINAPI_CC
|
|
GetSystemInfo(::_SYSTEM_INFO* lpSystemInfo);
|
|
#endif
|
|
|
|
#if ACTIV_BOOST_WINAPI_PARTITION_APP || ACTIV_BOOST_WINAPI_PARTITION_SYSTEM
|
|
#if ACTIV_BOOST_USE_WINAPI_VERSION >= ACTIV_BOOST_WINAPI_VERSION_WINXP
|
|
ACTIV_BOOST_WINAPI_IMPORT Boost::winapi::VOID_ ACTIV_BOOST_WINAPI_WINAPI_CC
|
|
GetNativeSystemInfo(::_SYSTEM_INFO* lpSystemInfo);
|
|
#endif
|
|
#endif
|
|
}
|
|
#endif
|
|
|
|
namespace Boost {
|
|
namespace winapi {
|
|
|
|
typedef struct ACTIV_BOOST_MAY_ALIAS _SYSTEM_INFO {
|
|
ACTIV_BOOST_WINAPI_DETAIL_EXTENSION union {
|
|
DWORD_ dwOemId;
|
|
ACTIV_BOOST_WINAPI_DETAIL_EXTENSION struct {
|
|
WORD_ wProcessorArchitecture;
|
|
WORD_ wReserved;
|
|
};
|
|
};
|
|
DWORD_ dwPageSize;
|
|
LPVOID_ lpMinimumApplicationAddress;
|
|
LPVOID_ lpMaximumApplicationAddress;
|
|
DWORD_PTR_ dwActiveProcessorMask;
|
|
DWORD_ dwNumberOfProcessors;
|
|
DWORD_ dwProcessorType;
|
|
DWORD_ dwAllocationGranularity;
|
|
WORD_ wProcessorLevel;
|
|
WORD_ wProcessorRevision;
|
|
} SYSTEM_INFO_, *LPSYSTEM_INFO_;
|
|
|
|
#if ACTIV_BOOST_WINAPI_PARTITION_APP_SYSTEM
|
|
ACTIV_BOOST_FORCEINLINE VOID_ GetSystemInfo(LPSYSTEM_INFO_ lpSystemInfo)
|
|
{
|
|
::GetSystemInfo(reinterpret_cast< ::_SYSTEM_INFO* >(lpSystemInfo));
|
|
}
|
|
#endif
|
|
|
|
#if ACTIV_BOOST_WINAPI_PARTITION_APP || ACTIV_BOOST_WINAPI_PARTITION_SYSTEM
|
|
#if ACTIV_BOOST_USE_WINAPI_VERSION >= ACTIV_BOOST_WINAPI_VERSION_WINXP
|
|
ACTIV_BOOST_FORCEINLINE VOID_ GetNativeSystemInfo(LPSYSTEM_INFO_ lpSystemInfo)
|
|
{
|
|
::GetNativeSystemInfo(reinterpret_cast< ::_SYSTEM_INFO* >(lpSystemInfo));
|
|
}
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
#include <ActivBoost/winapi/detail/footer.hpp>
|
|
|
|
#endif // ACTIV_BOOST_WINAPI_SYSTEM_HPP_INCLUDED_
|