Merge pull request #4 from MSOpenTech/winrt

[winrt support] Changes to update some of the Windows APIs to help support the Windows Runtime
This commit is contained in:
Andrey Semashev
2014-06-03 23:32:20 +04:00
2 changed files with 20 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
// system.hpp --------------------------------------------------------------// // system.hpp --------------------------------------------------------------//
// Copyright 2010 Vicente J. Botet Escriba // Copyright 2010 Vicente J. Botet Escriba
// Copyright (c) Microsoft Corporation 2014
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt // See http://www.boost.org/LICENSE_1_0.txt
@@ -20,8 +21,12 @@ namespace detail {
namespace winapi { namespace winapi {
#if defined( BOOST_USE_WINDOWS_H ) #if defined( BOOST_USE_WINDOWS_H )
typedef ::SYSTEM_INFO SYSTEM_INFO_; typedef ::SYSTEM_INFO SYSTEM_INFO_;
# if BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_WINXP
extern "C" __declspec(dllimport) void __stdcall GetSystemInfo (struct system_info *); extern "C" __declspec(dllimport) void __stdcall GetSystemInfo (struct system_info *);
# else # else
extern "C" __declspec(dllimport) void __stdcall GetNativeSystemInfo (struct system_info *);
# endif
#else
extern "C" { extern "C" {
typedef struct _SYSTEM_INFO { typedef struct _SYSTEM_INFO {
union { union {
@@ -42,8 +47,13 @@ extern "C" {
WORD_ wProcessorRevision; WORD_ wProcessorRevision;
} SYSTEM_INFO_; } SYSTEM_INFO_;
# if BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_WINXP
__declspec(dllimport) void __stdcall __declspec(dllimport) void __stdcall
GetSystemInfo (struct system_info *); GetSystemInfo (struct system_info *);
# else
__declspec(dllimport) void __stdcall
GetNativeSystemInfo (struct system_info *);
# endif
} }
#endif #endif
} }

View File

@@ -1,6 +1,7 @@
// time.hpp --------------------------------------------------------------// // time.hpp --------------------------------------------------------------//
// Copyright 2010 Vicente J. Botet Escriba // Copyright 2010 Vicente J. Botet Escriba
// Copyright (c) Microsoft Corporation 2014
// Distributed under the Boost Software License, Version 1.0. // Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt // See http://www.boost.org/LICENSE_1_0.txt
@@ -10,6 +11,7 @@
#define BOOST_DETAIL_WINAPI_TIME_HPP #define BOOST_DETAIL_WINAPI_TIME_HPP
#include <boost/detail/winapi/basic_types.hpp> #include <boost/detail/winapi/basic_types.hpp>
#include <boost/predef.h>
#ifdef BOOST_HAS_PRAGMA_ONCE #ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once #pragma once
@@ -31,10 +33,15 @@ namespace winapi {
#ifdef BOOST_HAS_GETSYSTEMTIMEASFILETIME // Windows CE does not define GetSystemTimeAsFileTime #ifdef BOOST_HAS_GETSYSTEMTIMEASFILETIME // Windows CE does not define GetSystemTimeAsFileTime
using ::GetSystemTimeAsFileTime; using ::GetSystemTimeAsFileTime;
#endif #endif
#if BOOST_PLAT_WINDOWS_DESKTOP
using ::FileTimeToLocalFileTime; using ::FileTimeToLocalFileTime;
#endif
using ::GetSystemTime; using ::GetSystemTime;
using ::SystemTimeToFileTime; using ::SystemTimeToFileTime;
#if BOOST_PLAT_WINDOWS_DESKTOP
using ::GetTickCount; using ::GetTickCount;
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
using ::GetTickCount64; using ::GetTickCount64;
#endif #endif
@@ -70,8 +77,10 @@ extern "C" {
__declspec(dllimport) int WINAPI __declspec(dllimport) int WINAPI
SystemTimeToFileTime(const SYSTEMTIME_* lpSystemTime, SystemTimeToFileTime(const SYSTEMTIME_* lpSystemTime,
FILETIME_* lpFileTime); FILETIME_* lpFileTime);
#if BOOST_PLAT_WINDOWS_DESKTOP
__declspec(dllimport) DWORD_ WINAPI __declspec(dllimport) DWORD_ WINAPI
GetTickCount(); GetTickCount();
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
__declspec(dllimport) ULONGLONG_ WINAPI __declspec(dllimport) ULONGLONG_ WINAPI
GetTickCount64(); GetTickCount64();