system.hpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // system.hpp --------------------------------------------------------------//
  2. // Copyright 2010 Vicente J. Botet Escriba
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // See http://www.boost.org/LICENSE_1_0.txt
  5. #ifndef BOOST_DETAIL_WINAPI_SYSTEM_HPP
  6. #define BOOST_DETAIL_WINAPI_SYSTEM_HPP
  7. #include <boost/detail/winapi/basic_types.hpp>
  8. #ifdef BOOST_HAS_PRAGMA_ONCE
  9. #pragma once
  10. #endif
  11. namespace boost {
  12. namespace detail {
  13. namespace winapi {
  14. #if defined( BOOST_USE_WINDOWS_H )
  15. typedef ::SYSTEM_INFO SYSTEM_INFO_;
  16. extern "C" __declspec(dllimport) void __stdcall GetSystemInfo (struct system_info *);
  17. #else
  18. extern "C" {
  19. typedef struct _SYSTEM_INFO {
  20. union {
  21. DWORD_ dwOemId;
  22. struct {
  23. WORD_ wProcessorArchitecture;
  24. WORD_ wReserved;
  25. } dummy;
  26. } ;
  27. DWORD_ dwPageSize;
  28. LPVOID_ lpMinimumApplicationAddress;
  29. LPVOID_ lpMaximumApplicationAddress;
  30. DWORD_PTR_ dwActiveProcessorMask;
  31. DWORD_ dwNumberOfProcessors;
  32. DWORD_ dwProcessorType;
  33. DWORD_ dwAllocationGranularity;
  34. WORD_ wProcessorLevel;
  35. WORD_ wProcessorRevision;
  36. } SYSTEM_INFO_;
  37. __declspec(dllimport) void __stdcall
  38. GetSystemInfo (struct system_info *);
  39. }
  40. #endif
  41. }
  42. }
  43. }
  44. #endif // BOOST_DETAIL_WINAPI_SYSTEM_HPP