]>
Commit | Line | Data |
---|---|---|
b32b8144 FG |
1 | /* |
2 | * Copyright 2016 Andrey Semashev | |
3 | * | |
4 | * Distributed under the Boost Software License, Version 1.0. | |
5 | * See http://www.boost.org/LICENSE_1_0.txt | |
6 | */ | |
7c673cae | 7 | |
b32b8144 FG |
8 | #ifndef BOOST_WINAPI_PAGE_PROTECTION_FLAGS_HPP_INCLUDED_ |
9 | #define BOOST_WINAPI_PAGE_PROTECTION_FLAGS_HPP_INCLUDED_ | |
7c673cae | 10 | |
b32b8144 | 11 | #include <boost/winapi/basic_types.hpp> |
7c673cae FG |
12 | |
13 | #ifdef BOOST_HAS_PRAGMA_ONCE | |
14 | #pragma once | |
15 | #endif | |
16 | ||
17 | namespace boost { | |
7c673cae FG |
18 | namespace winapi { |
19 | ||
20 | #if defined( BOOST_USE_WINDOWS_H ) | |
21 | ||
92f5a8d4 TL |
22 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_NOACCESS_ = PAGE_NOACCESS; |
23 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_READONLY_ = PAGE_READONLY; | |
24 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_READWRITE_ = PAGE_READWRITE; | |
25 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_WRITECOPY_ = PAGE_WRITECOPY; | |
26 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_GUARD_ = PAGE_GUARD; | |
27 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_NOCACHE_ = PAGE_NOCACHE; | |
28 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_WRITECOMBINE_ = PAGE_WRITECOMBINE; | |
7c673cae FG |
29 | |
30 | #else // defined( BOOST_USE_WINDOWS_H ) | |
31 | ||
92f5a8d4 TL |
32 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_NOACCESS_ = 0x01; |
33 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_READONLY_ = 0x02; | |
34 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_READWRITE_ = 0x04; | |
35 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_WRITECOPY_ = 0x08; | |
36 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_GUARD_ = 0x100; | |
37 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_NOCACHE_ = 0x200; | |
38 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_WRITECOMBINE_ = 0x400; | |
7c673cae FG |
39 | |
40 | #endif // defined( BOOST_USE_WINDOWS_H ) | |
41 | ||
b32b8144 FG |
42 | // The PAGE_EXECUTE flags were put into the DESKTOP UWP partition in Windows SDK 8.0 and 8.1 |
43 | // and then moved to be globally available again in SDK 10.0. Due to this, we simply define | |
44 | // them unconditionally to work around the issue and consider the 8.x SDKs in error. | |
45 | ||
92f5a8d4 TL |
46 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_EXECUTE_ = 0x10; |
47 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_EXECUTE_READ_ = 0x20; | |
48 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_EXECUTE_READWRITE_ = 0x40; | |
49 | BOOST_CONSTEXPR_OR_CONST DWORD_ PAGE_EXECUTE_WRITECOPY_ = 0x80; | |
b32b8144 | 50 | |
7c673cae FG |
51 | } |
52 | } | |
53 | ||
b32b8144 | 54 | #endif // BOOST_WINAPI_PAGE_PROTECTION_FLAGS_HPP_INCLUDED_ |