1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-09-11 16:56:32 -05:00

Initial commit

This commit is contained in:
Crimson-Hawk
2024-03-05 16:42:40 +08:00
commit f1e4595ebf
39576 changed files with 7006612 additions and 0 deletions

View File

View File

View File

@@ -0,0 +1,96 @@
* text=auto !eol svneol=native#text/plain
*.gitattributes text svneol=native#text/plain
# Scriptish formats
*.bat text svneol=native#text/plain
*.bsh text svneol=native#text/x-beanshell
*.cgi text svneol=native#text/plain
*.cmd text svneol=native#text/plain
*.js text svneol=native#text/javascript
*.php text svneol=native#text/x-php
*.pl text svneol=native#text/x-perl
*.pm text svneol=native#text/x-perl
*.py text svneol=native#text/x-python
*.sh eol=lf svneol=LF#text/x-sh
configure eol=lf svneol=LF#text/x-sh
# Image formats
*.bmp binary svneol=unset#image/bmp
*.gif binary svneol=unset#image/gif
*.ico binary svneol=unset#image/ico
*.jpeg binary svneol=unset#image/jpeg
*.jpg binary svneol=unset#image/jpeg
*.png binary svneol=unset#image/png
*.tif binary svneol=unset#image/tiff
*.tiff binary svneol=unset#image/tiff
*.svg text svneol=native#image/svg%2Bxml
# Data formats
*.pdf binary svneol=unset#application/pdf
*.avi binary svneol=unset#video/avi
*.doc binary svneol=unset#application/msword
*.dsp text svneol=crlf#text/plain
*.dsw text svneol=crlf#text/plain
*.eps binary svneol=unset#application/postscript
*.gz binary svneol=unset#application/gzip
*.mov binary svneol=unset#video/quicktime
*.mp3 binary svneol=unset#audio/mpeg
*.ppt binary svneol=unset#application/vnd.ms-powerpoint
*.ps binary svneol=unset#application/postscript
*.psd binary svneol=unset#application/photoshop
*.rdf binary svneol=unset#text/rdf
*.rss text svneol=unset#text/xml
*.rtf binary svneol=unset#text/rtf
*.sln text svneol=native#text/plain
*.swf binary svneol=unset#application/x-shockwave-flash
*.tgz binary svneol=unset#application/gzip
*.vcproj text svneol=native#text/xml
*.vcxproj text svneol=native#text/xml
*.vsprops text svneol=native#text/xml
*.wav binary svneol=unset#audio/wav
*.xls binary svneol=unset#application/vnd.ms-excel
*.zip binary svneol=unset#application/zip
# Text formats
.htaccess text svneol=native#text/plain
*.bbk text svneol=native#text/xml
*.cmake text svneol=native#text/plain
*.css text svneol=native#text/css
*.dtd text svneol=native#text/xml
*.htm text svneol=native#text/html
*.html text svneol=native#text/html
*.ini text svneol=native#text/plain
*.log text svneol=native#text/plain
*.mak text svneol=native#text/plain
*.qbk text svneol=native#text/plain
*.rst text svneol=native#text/plain
*.sql text svneol=native#text/x-sql
*.txt text svneol=native#text/plain
*.xhtml text svneol=native#text/xhtml%2Bxml
*.xml text svneol=native#text/xml
*.xsd text svneol=native#text/xml
*.xsl text svneol=native#text/xml
*.xslt text svneol=native#text/xml
*.xul text svneol=native#text/xul
*.yml text svneol=native#text/plain
boost-no-inspect text svneol=native#text/plain
CHANGES text svneol=native#text/plain
COPYING text svneol=native#text/plain
INSTALL text svneol=native#text/plain
Jamfile text svneol=native#text/plain
Jamroot text svneol=native#text/plain
Jamfile.v2 text svneol=native#text/plain
Jamrules text svneol=native#text/plain
Makefile* text svneol=native#text/plain
README text svneol=native#text/plain
TODO text svneol=native#text/plain
# Code formats
*.c text svneol=native#text/plain
*.cpp text svneol=native#text/plain
*.h text svneol=native#text/plain
*.hpp text svneol=native#text/plain
*.ipp text svneol=native#text/plain
*.tpp text svneol=native#text/plain
*.jam text svneol=native#text/plain
*.java text svneol=native#text/plain

View File

@@ -0,0 +1,19 @@
# Copyright 2018 Peter Dimov
# Copyright 2018 Andrey Semashev
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.5...3.20)
project(boost_winapi VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library(boost_winapi INTERFACE)
add_library(Boost::winapi ALIAS boost_winapi)
target_include_directories(boost_winapi INTERFACE include)
target_link_libraries(boost_winapi
INTERFACE
Boost::config
Boost::predef
)

View File

@@ -0,0 +1,15 @@
WinAPI
======
Windows API declarations without <windows.h>, for internal Boost use.
### Build Status
Branch | AppVeyor | Test Matrix | Dependencies |
:-------------: | -------- | ----------- | ------------ |
[`master`](https://github.com/boostorg/winapi/tree/master) | [![AppVeyor](https://ci.appveyor.com/api/projects/status/dkb233de24u30x9a/branch/master?svg=true)](https://ci.appveyor.com/project/Lastique/winapi/branch/master) | [![Tests](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/winapi.html) | [![Dependencies](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/winapi.html)
[`develop`](https://github.com/boostorg/winapi/tree/develop) | [![AppVeyor](https://ci.appveyor.com/api/projects/status/dkb233de24u30x9a/branch/develop?svg=true)](https://ci.appveyor.com/project/Lastique/winapi/branch/develop) | [![Tests](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/winapi.html) | [![Dependencies](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/winapi.html)
### License
Distributed under the [Boost Software License, Version 1.0](https://boost.org/LICENSE_1_0.txt).

View File

@@ -0,0 +1,191 @@
# Copyright 2016, 2017 Peter Dimov
# Copyright 2020 Andrey Semashev
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
# When copying this to a new library, be sure to update the name of the library
# in two places (once each at the top of install: and test_script:)
version: 1.0.{build}-{branch}
shallow_clone: true
branches:
only:
- develop
- master
matrix:
allow_failures:
- MAYFAIL: true
environment:
global:
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
# to use the default for a given environment, comment it out; recommend you build debug and release however..
# on Windows it is important to exercise all the possibilities, especially shared vs static
# B2_LINK: link=shared,static
B2_ADDRESS_MODEL: address-model=64,32
B2_THREADING: threading=multi
B2_VARIANT: variant=debug
matrix:
# test UWP Windows SDK 10
- COMMENT: UWP _WIN32_WINNT=0x0A00 (WIN10) DESKTOP
TOOLSET: msvc-14.2
DEFINES: define="_WIN32_WINNT=0x0A00" define="WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- COMMENT: UWP _WIN32_WINNT=0x0A00 (WIN10) SYSTEM
TOOLSET: msvc-14.2
DEFINES: define="_WIN32_WINNT=0x0A00" define="WINAPI_FAMILY=WINAPI_FAMILY_SYSTEM"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- COMMENT: UWP _WIN32_WINNT=0x0A00 (WIN10) PHONE
TOOLSET: msvc-14.2
DEFINES: define="_WIN32_WINNT=0x0A00" define="WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- COMMENT: UWP _WIN32_WINNT=0x0A00 (WIN10) APP
TOOLSET: msvc-14.2
DEFINES: define="_WIN32_WINNT=0x0A00" define="WINAPI_FAMILY=WINAPI_FAMILY_PC_APP"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# test UWP Windows SDK 8.1 (Visual Studio 2013)
- COMMENT: UWP _WIN32_WINNT=0x0603 (WIN8) DESKTOP
TOOLSET: msvc-12.0
DEFINES: define="_WIN32_WINNT=0x0603" define="WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- COMMENT: UWP _WIN32_WINNT=0x0603 (WIN8) PHONE
TOOLSET: msvc-12.0
DEFINES: define="_WIN32_WINNT=0x0603" define="WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- COMMENT: UWP _WIN32_WINNT=0x0603 (WIN8) APP
TOOLSET: msvc-12.0
DEFINES: define="_WIN32_WINNT=0x0603" define="WINAPI_FAMILY=WINAPI_FAMILY_PC_APP"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
# test UWP Windows SDK 8.0 (Visual Studio 2012)
- COMMENT: UWP _WIN32_WINNT=0x0602 (WIN8) DESKTOP
TOOLSET: msvc-11.0
B2_ADDRESS_MODEL: address-model=32 # Appveyor installation of this compiler only supports 32 bits
DEFINES: define="_WIN32_WINNT=0x0602" define="WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- COMMENT: UWP _WIN32_WINNT=0x0602 (WIN8) APP
TOOLSET: msvc-11.0
B2_ADDRESS_MODEL: address-model=32 # Appveyor installation of this compiler only supports 32 bits
DEFINES: define="_WIN32_WINNT=0x0602" define="WINAPI_FAMILY=WINAPI_FAMILY_APP"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
# test older compilers, stock settings
- COMMENT: Visual Studio 2008
TOOLSET: msvc-9.0
B2_ADDRESS_MODEL: address-model=32 # Appveyor installation of this compiler only supports 32 bits
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- COMMENT: Visual Studio 2010
TOOLSET: msvc-10.0
B2_ADDRESS_MODEL: address-model=32 # Appveyor installation of this compiler only supports 32 bits
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- COMMENT: Visual Studio 2012
TOOLSET: msvc-11.0
B2_ADDRESS_MODEL: address-model=32 # Appveyor installation of this compiler only supports 32 bits
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- COMMENT: Visual Studio 2013
TOOLSET: msvc-12.0
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- COMMENT: Visual Studio 2015
TOOLSET: msvc-14.0
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- COMMENT: Visual Studio 2017
TOOLSET: msvc-14.1
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- COMMENT: Visual Studio 2017 (clang-cl)
TOOLSET: clang-win
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- COMMENT: Cygwin
TOOLSET: gcc
B2_ADDRESS_MODEL: address-model=32 # 32-bit Cygwin only supports 32 bits
ADDPATH: C:\cygwin\bin
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- COMMENT: Cygwin 64
TOOLSET: gcc
B2_ADDRESS_MODEL: address-model=64 # Appveyor installation of 64-bit Cygwin only supports 64 bits
ADDPATH: C:\cygwin64\bin
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- COMMENT: MinGW
TOOLSET: gcc
B2_ADDRESS_MODEL: address-model=32 # Legacy MinGW only supports 32 bits
ADDPATH: C:\mingw\bin
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- COMMENT: MinGW-w64 gcc 6 64-bit
TOOLSET: gcc
B2_ADDRESS_MODEL: address-model=64
ADDPATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- COMMENT: MinGW-w64 gcc 6 32-bit
TOOLSET: gcc
B2_ADDRESS_MODEL: address-model=32
ADDPATH: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- COMMENT: MinGW-w64 gcc 7 64-bit
TOOLSET: gcc
B2_ADDRESS_MODEL: address-model=64
ADDPATH: C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
# test platform targets
- COMMENT: _WIN32_WINNT=0x0400 (NT4)
TOOLSET: msvc-14.2
DEFINES: define="_WIN32_WINNT=0x0400"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- COMMENT: _WIN32_WINNT=0x0500 (2K)
TOOLSET: msvc-14.2
DEFINES: define="_WIN32_WINNT=0x0500"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- COMMENT: _WIN32_WINNT=0x0501 (XP)
TOOLSET: msvc-14.2
DEFINES: define="_WIN32_WINNT=0x0501"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- COMMENT: _WIN32_WINNT=0x0502 (WS03)
TOOLSET: msvc-14.2
DEFINES: define="_WIN32_WINNT=0x0502"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- COMMENT: _WIN32_WINNT=0x0600 (VISTA/WS08)
TOOLSET: msvc-14.2
DEFINES: define="_WIN32_WINNT=0x0600"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- COMMENT: _WIN32_WINNT=0x0601 (WIN7)
TOOLSET: msvc-14.2
DEFINES: define="_WIN32_WINNT=0x0601"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- COMMENT: _WIN32_WINNT=0x0602 (WIN8)
TOOLSET: msvc-14.2
DEFINES: define="_WIN32_WINNT=0x0602"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- COMMENT: _WIN32_WINNT=0x0603 (WIN8.1)
TOOLSET: msvc-14.2
DEFINES: define="_WIN32_WINNT=0x0603"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- COMMENT: _WIN32_WINNT=0x0A00 (WIN10)
TOOLSET: msvc-14.2
DEFINES: define="_WIN32_WINNT=0x0A00"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
install:
- set SELF=winapi
- set GIT_FETCH_JOBS=8
- cd ..
- git clone -b %APPVEYOR_REPO_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule init tools/boostdep
- git submodule init tools/build
- git submodule init tools/boost_install
- git submodule init libs/headers
- git submodule init libs/config
- git submodule update --jobs %GIT_FETCH_JOBS%
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\%SELF%
- python tools/boostdep/depinst/depinst.py --git_args "--jobs %GIT_FETCH_JOBS%" %SELF%
- cmd /c bootstrap
- b2 headers
build: off
test_script:
- set SELF=winapi
- PATH=%ADDPATH%;%PATH%
- echo %PATH%
- echo b2 -j %NUMBER_OF_PROCESSORS% libs/%SELF%/test toolset=%TOOLSET% %CXXFLAGS% %DEFINES% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT%
- b2 -j %NUMBER_OF_PROCESSORS% libs/%SELF%/test toolset=%TOOLSET% %CXXFLAGS% %DEFINES% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT%

View File

@@ -0,0 +1,26 @@
# Copyright (c) 2016 Andrey Semashev
#
# Distributed under the Boost Software License,
# Version 1.0. (See accompanying file LICENSE_1_0.txt
# or copy at http://boost.org/LICENSE_1_0.txt)
import doxygen ;
import quickbook ;
xml winapi : winapi.qbk ;
boostbook standalone
:
winapi
:
<xsl:param>boost.root=../../../..
<xsl:param>generate.section.toc.level=1
<xsl:param>toc.max.depth=1
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/winapi/doc/html
;
###############################################################################
alias boostdoc ;
explicit boostdoc ;
alias boostrelease : standalone ;
explicit boostrelease ;

View File

@@ -0,0 +1,89 @@
[/
Copyright (c) 2016-2018 Andrey Semashev
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
or copy at http://boost.org/LICENSE_1_0.txt)
]
[library Boost.WinAPI
[quickbook 1.6]
[id winapi]
[copyright 2016-2018 Andrey Semashev]
[dirname winapi]
[license Distributed under the [@http://boost.org/LICENSE_1_0.txt Boost Software License, Version 1.0].]
]
[section:intro Introduction]
The Boost.WinAPI library is an abstraction layer for Windows API intended to be used internally by other Boost libraries. Boost.WinAPI is not a public library for users of Boost.
The main advantages of using Boost.WinAPI instead of Windows API directly are:
* Avoid including `<windows.h>` or other Windows SDK headers in public headers of your library. Windows SDK headers are known to be dependent on a large number of configuration macros that have to be defined by the user. If your library depends on a particular API, you may not be able to rely on it being enabled by the user. On the other hand, your library cannot enforce particular Windows SDK configuration because (a) Windows SDK headers may be included before your library headers with a different set of config macros and (b) because your desired configuration may be incompatible with that of the user's code.
* Avoid dealing with lots of macros defined by Windows SDK headers.
* More fine grained control of the API you include in your headers.
* Allow to select the target Windows version for Boost. This version can be different from the version user's code targets.
* Better compatibility with different implementations of Windows SDK, like MinGW and MinGW-w64.
The implementation of Boost.WinAPI consists of a number of declarations of functions, types and constants mimicking the real declarations in Windows SDK. In some cases simple inline function wrappers are provided. As a result the runtime performance impact of Boost.WinAPI should be zero. Boost.WinAPI only depends on Boost.Config and Boost.Predef and is compatible with C++03 compilers.
[endsect]
[section:config Configuration]
Boost.WinAPI recognizes the following configuration macros:
[table Configuration macros
[[Macro name] [Effect]]
[[`BOOST_USE_WINAPI_VERSION`] [If defined, designates the target Windows API version. The version should be given as hexadecimal integer, same as the `_WIN32_WINNT` macro values. Some of the versions are given [@https://msdn.microsoft.com/en-us/library/aa383745(v=vs.100).aspx#macros_for_conditional_declarations here]. If the macro is not defined, the version is deduced from `_WIN32_WINNT` and `WINVER` macros, if they are defined, or the default version is chosen. The default version is currently Windows Vista/Server 2008 on compilers that support this version of SDK and Windows XP on others. The default may change in future releases.]]
[[`BOOST_USE_NTDDI_VERSION`] [If defined, designates the target Windows API version down to a particular Service Pack. This macro offers a more fine grained way to define the target Windows version than `BOOST_USE_WINAPI_VERSION`. The version should be given as hexadecimal integer, same as the `NTDDI_VERSION` macro values. Some of the versions are given [@https://msdn.microsoft.com/en-us/library/aa383745(v=vs.100).aspx#macros_for_conditional_declarations here]. If the macro is not defined, the version is deduced from `NTDDI_VERSION` and `BOOST_USE_WINAPI_VERSION` macros, in the latter case defaulting to the latest revision of the indicated Windows version. If `BOOST_USE_NTDDI_VERSION` is defined, `BOOST_USE_WINAPI_VERSION` is also expected to be defined to a corresponding value.]]
[[`BOOST_USE_WINAPI_FAMILY`] [If defined, designates the Windows API family to use. The family can be set to one of the values of the `WINAPI_FAMILY`.]]
[[`BOOST_USE_WINDOWS_H`] [This macro is part of Boost.Config. If defined, Boost.WinAPI will include `<windows.h>` and any other headers from Windows SDK as needed. Otherwise Boost.WinAPI will provide its own declarations of the SDK components as needed without including SDK headers.]]
[[`BOOST_NO_ANSI_APIS`] [This macro is defined by Boost.Config on platforms that do not support narrow-character versions of some APIs. Boost.WinAPI will not declare narrow-character APIs when this macro is defined.]]
]
User's code can include `<boost/winapi/config.hpp>` to define a number of macros that can be useful. Including this header is recommended in any code that involves Windows API usage.
[table Defined configuration macros
[[Macro name] [Effect]]
[[`BOOST_USE_WINAPI_VERSION`,[br]`BOOST_USE_NTDDI_VERSION`]
[If not defined by user, these macros are defined by the header to the target Windows API version.]]
[[`BOOST_WINAPI_VERSION_NT4`,[br]`BOOST_WINAPI_VERSION_WIN2K`,[br]`BOOST_WINAPI_VERSION_WINXP`,[br]`BOOST_WINAPI_VERSION_WS03`,[br]`BOOST_WINAPI_VERSION_WIN6`,[br]`BOOST_WINAPI_VERSION_VISTA`,[br]`BOOST_WINAPI_VERSION_WS08`,[br]`BOOST_WINAPI_VERSION_LONGHORN`,[br]`BOOST_WINAPI_VERSION_WIN7`,[br]`BOOST_WINAPI_VERSION_WIN8`,[br]`BOOST_WINAPI_VERSION_WINBLUE`,[br]`BOOST_WINAPI_VERSION_WINTHRESHOLD`,[br]`BOOST_WINAPI_VERSION_WIN10`]
[These macros expand to the constants designating the particular Windows versions and can be used together with `BOOST_USE_WINAPI_VERSION` in preprocessor version checks.]]
[[`BOOST_WINAPI_IS_MINGW`] [Defined if Windows SDK is provided by [@http://mingw.org/ MinGW].]]
[[`BOOST_WINAPI_IS_MINGW_W64`] [Defined if Windows SDK is provided by [@http://mingw-w64.org MinGW-w64]. Note that is does not mean that the code is compiled for 64-bit Windows.]]
[[`BOOST_WINAPI_IS_CYGWIN`] [Defined if Windows SDK is provided by MinGW variant from [@https://cygwin.com/ Cygwin].]]
]
[endsect]
[section:usage Using Boost.WinAPI]
In order to use Boost.WinAPI you have to include one or several headers from the `boost/winapi` directory. Each header there defines a portion of Windows API, the name of the header should be self-explanatory. Each Boost.WinAPI header may declare a number of symbols like functions and types in the global namespace, mimicking the Windows SDK, and the corresponding set of symbols in the `boost::winapi` namespace. User's code is supposed to use the symbols from the `boost::winapi` namespace only.
Most of the functions in the `boost::winapi` have the same name and meaning as the corresponding Windows API functions. Types and constants have a trailing underscore ('_') in their name to avoid clashes with macros that are defined in Windows SDK.
[note Boost.WinAPI does not define function-name macros that expand to the `char` or `wchar_t` based functions depending on the `UNICODE` macro. Boost.WinAPI also does not support `_TCHAR` and related string types. Users have to explicitly use the `*A` or `*W` functions with appropriate argument types. Note however that `*A` functions may not be available if `BOOST_NO_ANSI_APIS` is defined.]
For example, here is how one would create and destroy a semaphore with Boost.WinAPI:
#include <limits>
#include <boost/winapi/handles.hpp>
#include <boost/winapi/semaphore.hpp>
boost::winapi::HANDLE_ h = boost::winapi::CreateSemaphoreExW(
NULL, // security attributes
0l, // initial count
std::numeric_limits< boost::winapi::LONG_ >::max(), // max count
L"Local\\MySemaphore", // semaphore name
0l, // flags
boost::winapi::SEMAPHORE_ALL_ACCESS_ // access mode
);
if (h)
boost::winapi::CloseHandle(h);
Refer to [@https://msdn.microsoft.com/library MSDN] for documentation on the particular functions, types and constants.
[endsect]

View File

@@ -0,0 +1,273 @@
#ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED
#define BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED
//
// boost/detail/interlocked.hpp
//
// Copyright 2005 Peter Dimov
// Copyright 2018, 2019 Andrey Semashev
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
// BOOST_INTERLOCKED_HAS_INTRIN_H
// VC9 has intrin.h, but it collides with <utility>
#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600
# define BOOST_INTERLOCKED_HAS_INTRIN_H
// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets.
#elif defined( __MINGW64_VERSION_MAJOR )
// MinGW-w64 provides intrin.h for both 32 and 64-bit targets.
# define BOOST_INTERLOCKED_HAS_INTRIN_H
#elif defined( __CYGWIN__ )
// Cygwin and Cygwin64 provide intrin.h. On Cygwin64 we have to use intrin.h because it's an LP64 target,
// where long is 64-bit and therefore _Interlocked* functions have different signatures.
# define BOOST_INTERLOCKED_HAS_INTRIN_H
// Intel C++ on Windows on VC10+ stdlib
#elif defined( BOOST_INTEL_WIN ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
# define BOOST_INTERLOCKED_HAS_INTRIN_H
// clang-cl on Windows on VC10+ stdlib
#elif defined( __clang__ ) && defined( _MSC_VER ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
# define BOOST_INTERLOCKED_HAS_INTRIN_H
#endif
#if !defined(__LP64__)
#define BOOST_INTERLOCKED_LONG32 long
#else
#define BOOST_INTERLOCKED_LONG32 int
#endif
#if defined( BOOST_USE_WINDOWS_H )
# include <windows.h>
# define BOOST_INTERLOCKED_INCREMENT(dest) \
InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
# define BOOST_INTERLOCKED_DECREMENT(dest) \
InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare))
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
InterlockedExchangePointer((void**)(dest), (void*)(exchange))
#elif defined( BOOST_USE_INTRIN_H ) || defined( BOOST_INTERLOCKED_HAS_INTRIN_H )
#include <intrin.h>
# define BOOST_INTERLOCKED_INCREMENT(dest) \
_InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
# define BOOST_INTERLOCKED_DECREMENT(dest) \
_InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
_InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
_InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
_InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
// Note: Though MSVC-12 defines _InterlockedCompareExchangePointer and _InterlockedExchangePointer in intrin.h, the latter
// is actually broken as it conflicts with winnt.h from Windows SDK 8.1.
# if (defined(_MSC_VER) && _MSC_VER >= 1900) || \
(defined(_M_IA64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_ARM64))
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
_InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare))
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
_InterlockedExchangePointer((void**)(dest), (void*)(exchange))
# else
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare)))
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
((void*)BOOST_INTERLOCKED_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange)))
# endif
#elif defined(_WIN32_WCE)
#if _WIN32_WCE >= 0x600
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedIncrement( BOOST_INTERLOCKED_LONG32 volatile * );
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedDecrement( BOOST_INTERLOCKED_LONG32 volatile * );
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedCompareExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32, BOOST_INTERLOCKED_LONG32 );
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedExchangeAdd( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
# define BOOST_INTERLOCKED_INCREMENT(dest) \
_InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
# define BOOST_INTERLOCKED_DECREMENT(dest) \
_InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
_InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
_InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
_InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
#else // _WIN32_WCE >= 0x600
// under Windows CE we still have old-style Interlocked* functions
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedIncrement( BOOST_INTERLOCKED_LONG32 * );
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedDecrement( BOOST_INTERLOCKED_LONG32 * );
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedCompareExchange( BOOST_INTERLOCKED_LONG32 *, BOOST_INTERLOCKED_LONG32, BOOST_INTERLOCKED_LONG32 );
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedExchange( BOOST_INTERLOCKED_LONG32 *, BOOST_INTERLOCKED_LONG32 );
extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedExchangeAdd( BOOST_INTERLOCKED_LONG32 *, BOOST_INTERLOCKED_LONG32 );
# define BOOST_INTERLOCKED_INCREMENT(dest) \
InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
# define BOOST_INTERLOCKED_DECREMENT(dest) \
InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
#endif // _WIN32_WCE >= 0x600
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare)))
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
((void*)BOOST_INTERLOCKED_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange)))
#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
# if defined( __CLRCALL_PURE_OR_CDECL )
# define BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL __CLRCALL_PURE_OR_CDECL
# else
# define BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL __cdecl
# endif
extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedIncrement( BOOST_INTERLOCKED_LONG32 volatile * );
extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedDecrement( BOOST_INTERLOCKED_LONG32 volatile * );
extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32, BOOST_INTERLOCKED_LONG32 );
extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
# if defined( BOOST_MSVC ) && BOOST_MSVC >= 1310
# pragma intrinsic( _InterlockedIncrement )
# pragma intrinsic( _InterlockedDecrement )
# pragma intrinsic( _InterlockedCompareExchange )
# pragma intrinsic( _InterlockedExchange )
# pragma intrinsic( _InterlockedExchangeAdd )
# endif
# if defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM64)
extern "C" void* BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedCompareExchangePointer( void* volatile *, void*, void* );
extern "C" void* BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchangePointer( void* volatile *, void* );
# if defined( BOOST_MSVC ) && BOOST_MSVC >= 1310
# pragma intrinsic( _InterlockedCompareExchangePointer )
# pragma intrinsic( _InterlockedExchangePointer )
# endif
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
_InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare))
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
_InterlockedExchangePointer((void**)(dest), (void*)(exchange))
# else
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare)))
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
((void*)BOOST_INTERLOCKED_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange)))
# endif
# undef BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL
# define BOOST_INTERLOCKED_INCREMENT(dest) \
_InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
# define BOOST_INTERLOCKED_DECREMENT(dest) \
_InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
_InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
_InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
_InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
#define BOOST_INTERLOCKED_IMPORT __declspec(dllimport)
namespace boost
{
namespace detail
{
extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedIncrement( BOOST_INTERLOCKED_LONG32 volatile * );
extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedDecrement( BOOST_INTERLOCKED_LONG32 volatile * );
extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedCompareExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32, BOOST_INTERLOCKED_LONG32 );
extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedExchangeAdd( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
# if defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM64)
extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* );
extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* );
# endif
} // namespace detail
} // namespace boost
# define BOOST_INTERLOCKED_INCREMENT(dest) \
::boost::detail::InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
# define BOOST_INTERLOCKED_DECREMENT(dest) \
::boost::detail::InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
::boost::detail::InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
::boost::detail::InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
::boost::detail::InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
# if defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM64)
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
::boost::detail::InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare))
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
::boost::detail::InterlockedExchangePointer((void**)(dest), (void*)(exchange))
# else
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((BOOST_INTERLOCKED_LONG32 volatile*)(dest),(BOOST_INTERLOCKED_LONG32)(exchange),(BOOST_INTERLOCKED_LONG32)(compare)))
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
((void*)BOOST_INTERLOCKED_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest),(BOOST_INTERLOCKED_LONG32)(exchange)))
# endif
#else
# error "Interlocked intrinsics not available"
#endif
#endif // #ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/access_rights.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_ACCESS_RIGHTS_HPP
#define BOOST_DETAIL_WINAPI_ACCESS_RIGHTS_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/access_rights.hpp>")
#include <boost/winapi/access_rights.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_ACCESS_RIGHTS_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/apc.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_APC_HPP
#define BOOST_DETAIL_WINAPI_APC_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/apc.hpp>")
#include <boost/winapi/apc.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_APC_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/basic_types.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP
#define BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/basic_types.hpp>")
#include <boost/winapi/basic_types.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/bcrypt.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_BCRYPT_HPP_
#define BOOST_DETAIL_WINAPI_BCRYPT_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/bcrypt.hpp>")
#include <boost/winapi/bcrypt.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_BCRYPT_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/character_code_conversion.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_CHARACTER_CODE_CONVERSION_HPP
#define BOOST_DETAIL_WINAPI_CHARACTER_CODE_CONVERSION_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/character_code_conversion.hpp>")
#include <boost/winapi/character_code_conversion.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_CHARACTER_CODE_CONVERSION_HPP

View File

@@ -0,0 +1,27 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/condition_variable.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_CONDITION_VARIABLE_HPP
#define BOOST_DETAIL_WINAPI_CONDITION_VARIABLE_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/condition_variable.hpp>")
#include <boost/winapi/condition_variable.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
// Deprecated
#define BOOST_DETAIL_WINAPI_CONDITION_VARIABLE_INIT BOOST_WINAPI_CONDITION_VARIABLE_INIT
#endif // BOOST_DETAIL_WINAPI_CONDITION_VARIABLE_HPP

View File

@@ -0,0 +1,23 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/config.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
#define BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/config.hpp>")
#include <boost/winapi/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/critical_section.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_CRITICAL_SECTION_HPP
#define BOOST_DETAIL_WINAPI_CRITICAL_SECTION_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/critical_section.hpp>")
#include <boost/winapi/critical_section.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_CRITICAL_SECTION_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/crypt.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_CRYPT_HPP
#define BOOST_DETAIL_WINAPI_CRYPT_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/crypt.hpp>")
#include <boost/winapi/crypt.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_CRYPT_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/dbghelp.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_DBGHELP_HPP
#define BOOST_DETAIL_WINAPI_DBGHELP_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/dbghelp.hpp>")
#include <boost/winapi/dbghelp.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_DBGHELP_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/debugapi.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_DEBUGAPI_HPP
#define BOOST_DETAIL_WINAPI_DEBUGAPI_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/debugapi.hpp>")
#include <boost/winapi/debugapi.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_DEBUGAPI_HPP

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, it provides the deprecated namespace for backward compatibility.
*/
#ifndef BOOST_DETAIL_WINAPI_DETAIL_DEPRECATED_NAMESPACE_HPP_INCLUDED_
#define BOOST_DETAIL_WINAPI_DETAIL_DEPRECATED_NAMESPACE_HPP_INCLUDED_
#include <boost/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
namespace boost {
namespace winapi {}
namespace detail {
namespace winapi {
using namespace boost::winapi;
} // namespace winapi
} // namespace detail
} // namespace boost
#endif // BOOST_DETAIL_WINAPI_DETAIL_DEPRECATED_NAMESPACE_HPP_INCLUDED_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/directory_management.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_DIRECTORY_MANAGEMENT_HPP
#define BOOST_DETAIL_WINAPI_DIRECTORY_MANAGEMENT_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/directory_management.hpp>")
#include <boost/winapi/directory_management.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_DIRECTORY_MANAGEMENT_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/dll.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_DLL_HPP
#define BOOST_DETAIL_WINAPI_DLL_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/dll.hpp>")
#include <boost/winapi/dll.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_DLL_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/environment.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_ENVIRONMENT_HPP_
#define BOOST_DETAIL_WINAPI_ENVIRONMENT_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/environment.hpp>")
#include <boost/winapi/environment.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_ENVIRONMENT_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/error_codes.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_ERROR_CODES_HPP_
#define BOOST_DETAIL_WINAPI_ERROR_CODES_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/error_codes.hpp>")
#include <boost/winapi/error_codes.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_ERROR_CODES_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/error_handling.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_ERROR_HANDLING_HPP
#define BOOST_DETAIL_WINAPI_ERROR_HANDLING_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/error_handling.hpp>")
#include <boost/winapi/error_handling.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_ERROR_HANDLING_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/event.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_EVENT_HPP_
#define BOOST_DETAIL_WINAPI_EVENT_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/event.hpp>")
#include <boost/winapi/event.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_EVENT_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/file_management.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_FILE_MANAGEMENT_HPP
#define BOOST_DETAIL_WINAPI_FILE_MANAGEMENT_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/file_management.hpp>")
#include <boost/winapi/file_management.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_FILE_MANAGEMENT_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/file_mapping.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_FILE_MAPPING_HPP
#define BOOST_DETAIL_WINAPI_FILE_MAPPING_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/file_mapping.hpp>")
#include <boost/winapi/file_mapping.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_FILE_MAPPING_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_current_process.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP
#define BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/get_current_process.hpp>")
#include <boost/winapi/get_current_process.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_current_process_id.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP
#define BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/get_current_process_id.hpp>")
#include <boost/winapi/get_current_process_id.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_current_thread.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP
#define BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/get_current_thread.hpp>")
#include <boost/winapi/get_current_thread.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_current_thread_id.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP
#define BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/get_current_thread_id.hpp>")
#include <boost/winapi/get_current_thread_id.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_last_error.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_GET_LAST_ERROR_HPP
#define BOOST_DETAIL_WINAPI_GET_LAST_ERROR_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/get_last_error.hpp>")
#include <boost/winapi/get_last_error.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_GET_LAST_ERROR_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_process_times.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_GET_PROCESS_TIMES_HPP
#define BOOST_DETAIL_WINAPI_GET_PROCESS_TIMES_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/get_process_times.hpp>")
#include <boost/winapi/get_process_times.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_GET_PROCESS_TIMES_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_system_directory.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_GET_SYSTEM_DIRECTORY_HPP_
#define BOOST_DETAIL_WINAPI_GET_SYSTEM_DIRECTORY_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/get_system_directory.hpp>")
#include <boost/winapi/get_system_directory.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_GET_SYSTEM_DIRECTORY_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/get_thread_times.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP
#define BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/get_thread_times.hpp>")
#include <boost/winapi/get_thread_times.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/handle_info.hpp instead.
*/
#ifndef BOOST_DETAIL_HANDLE_INFO_HPP_
#define BOOST_DETAIL_HANDLE_INFO_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/handle_info.hpp>")
#include <boost/winapi/handle_info.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_HANDLE_INFO_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/handles.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_HANDLES_HPP
#define BOOST_DETAIL_WINAPI_HANDLES_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/handles.hpp>")
#include <boost/winapi/handles.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_HANDLES_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/heap_memory.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP_
#define BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/heap_memory.hpp>")
#include <boost/winapi/heap_memory.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_HEAP_MEMORY_HPP_

View File

@@ -0,0 +1,26 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/init_once.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_INIT_ONCE_HPP
#define BOOST_DETAIL_WINAPI_INIT_ONCE_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/init_once.hpp>")
#include <boost/winapi/init_once.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#define BOOST_DETAIL_WINAPI_INIT_ONCE_STATIC_INIT BOOST_WINAPI_INIT_ONCE_STATIC_INIT
#endif // BOOST_DETAIL_WINAPI_INIT_ONCE_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/jobs.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_JOBS_HPP_
#define BOOST_DETAIL_WINAPI_JOBS_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/jobs.hpp>")
#include <boost/winapi/jobs.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_JOBS_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/limits.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_LIMITS_HPP_
#define BOOST_DETAIL_WINAPI_LIMITS_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/limits.hpp>")
#include <boost/winapi/limits.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_LIMITS_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/local_memory.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_LOCAL_MEMORY_HPP
#define BOOST_DETAIL_WINAPI_LOCAL_MEMORY_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/local_memory.hpp>")
#include <boost/winapi/local_memory.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_LOCAL_MEMORY_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/memory.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_MEMORY_HPP
#define BOOST_DETAIL_WINAPI_MEMORY_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/memory.hpp>")
#include <boost/winapi/memory.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_MEMORY_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/mutex.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_MUTEX_HPP_
#define BOOST_DETAIL_WINAPI_MUTEX_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/mutex.hpp>")
#include <boost/winapi/mutex.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_MUTEX_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/overlapped.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_OVERLAPPED_HPP_
#define BOOST_DETAIL_WINAPI_OVERLAPPED_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/overlapped.hpp>")
#include <boost/winapi/overlapped.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_OVERLAPPED_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/page_protection_flags.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_PAGE_PROTECTION_FLAGS_HPP
#define BOOST_DETAIL_WINAPI_PAGE_PROTECTION_FLAGS_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/page_protection_flags.hpp>")
#include <boost/winapi/page_protection_flags.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_PAGE_PROTECTION_FLAGS_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/pipes.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_PIPES_HPP_
#define BOOST_DETAIL_WINAPI_PIPES_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/pipes.hpp>")
#include <boost/winapi/pipes.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_PIPES_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/priority_class.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_PRIORITY_CLASS_HPP_
#define BOOST_DETAIL_WINAPI_PRIORITY_CLASS_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/priority_class.hpp>")
#include <boost/winapi/priority_class.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_PRIORITY_CLASS_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/process.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_PROCESS_HPP_
#define BOOST_DETAIL_WINAPI_PROCESS_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/process.hpp>")
#include <boost/winapi/process.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_PROCESS_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/security.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_SECURITY_HPP
#define BOOST_DETAIL_WINAPI_SECURITY_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/security.hpp>")
#include <boost/winapi/security.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_SECURITY_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/semaphore.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_SEMAPHORE_HPP_
#define BOOST_DETAIL_WINAPI_SEMAPHORE_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/semaphore.hpp>")
#include <boost/winapi/semaphore.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_SEMAPHORE_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/shell.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_SHELL_HPP_
#define BOOST_DETAIL_WINAPI_SHELL_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/shell.hpp>")
#include <boost/winapi/shell.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_SHELL_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/show_window.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_SHOW_WINDOW_HPP_
#define BOOST_DETAIL_WINAPI_SHOW_WINDOW_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/show_window.hpp>")
#include <boost/winapi/show_window.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_SHOW_WINDOW_HPP_

View File

@@ -0,0 +1,27 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/srw_lock.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_SRW_LOCK_HPP
#define BOOST_DETAIL_WINAPI_SRW_LOCK_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/srw_lock.hpp>")
#include <boost/winapi/srw_lock.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
// Deprecated
#define BOOST_DETAIL_WINAPI_SRWLOCK_INIT BOOST_WINAPI_SRWLOCK_INIT
#endif // BOOST_DETAIL_WINAPI_SRW_LOCK_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/stack_backtrace.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
#define BOOST_DETAIL_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/stack_backtrace.hpp>")
#include <boost/winapi/stack_backtrace.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_STACK_BACKTRACE_HPP_INCLUDED_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/synchronization.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_SYNCHRONIZATION_HPP
#define BOOST_DETAIL_WINAPI_SYNCHRONIZATION_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/synchronization.hpp>")
#include <boost/winapi/synchronization.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_SYNCHRONIZATION_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/system.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_SYSTEM_HPP
#define BOOST_DETAIL_WINAPI_SYSTEM_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/system.hpp>")
#include <boost/winapi/system.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_SYSTEM_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/thread.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_THREAD_HPP
#define BOOST_DETAIL_WINAPI_THREAD_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/thread.hpp>")
#include <boost/winapi/thread.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_THREAD_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/thread_pool.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_THREAD_POOL_HPP
#define BOOST_DETAIL_WINAPI_THREAD_POOL_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/thread_pool.hpp>")
#include <boost/winapi/thread_pool.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_THREAD_POOL_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/time.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_TIME_HPP_
#define BOOST_DETAIL_WINAPI_TIME_HPP_
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/time.hpp>")
#include <boost/winapi/time.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_TIME_HPP_

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/timers.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_TIMERS_HPP
#define BOOST_DETAIL_WINAPI_TIMERS_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/timers.hpp>")
#include <boost/winapi/timers.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_TIMERS_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/tls.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_TLS_HPP
#define BOOST_DETAIL_WINAPI_TLS_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/tls.hpp>")
#include <boost/winapi/tls.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_TLS_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/wait.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_WAIT_HPP
#define BOOST_DETAIL_WINAPI_WAIT_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/wait.hpp>")
#include <boost/winapi/wait.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_WAIT_HPP

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*
* This header is deprecated, use boost/winapi/waitable_timer.hpp instead.
*/
#ifndef BOOST_DETAIL_WINAPI_WAITABLE_TIMER_HPP
#define BOOST_DETAIL_WINAPI_WAITABLE_TIMER_HPP
#include <boost/config/header_deprecated.hpp>
BOOST_HEADER_DEPRECATED("<boost/winapi/waitable_timer.hpp>")
#include <boost/winapi/waitable_timer.hpp>
#include <boost/detail/winapi/detail/deprecated_namespace.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_WAITABLE_TIMER_HPP

View File

@@ -0,0 +1,84 @@
/*
* Copyright 2016 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_ACCESS_RIGHTS_HPP_INCLUDED_
#define BOOST_WINAPI_ACCESS_RIGHTS_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
namespace boost {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST DWORD_ DELETE_ = DELETE;
BOOST_CONSTEXPR_OR_CONST DWORD_ READ_CONTROL_ = READ_CONTROL;
BOOST_CONSTEXPR_OR_CONST DWORD_ WRITE_DAC_ = WRITE_DAC;
BOOST_CONSTEXPR_OR_CONST DWORD_ WRITE_OWNER_ = WRITE_OWNER;
BOOST_CONSTEXPR_OR_CONST DWORD_ SYNCHRONIZE_ = SYNCHRONIZE;
BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_ALL_ = STANDARD_RIGHTS_ALL;
BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_EXECUTE_ = STANDARD_RIGHTS_EXECUTE;
BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_READ_ = STANDARD_RIGHTS_READ;
BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_REQUIRED_ = STANDARD_RIGHTS_REQUIRED;
BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_WRITE_ = STANDARD_RIGHTS_WRITE;
BOOST_CONSTEXPR_OR_CONST DWORD_ SPECIFIC_RIGHTS_ALL_ = SPECIFIC_RIGHTS_ALL;
BOOST_CONSTEXPR_OR_CONST DWORD_ ACCESS_SYSTEM_SECURITY_ = ACCESS_SYSTEM_SECURITY;
BOOST_CONSTEXPR_OR_CONST DWORD_ MAXIMUM_ALLOWED_ = MAXIMUM_ALLOWED;
BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_ALL_ = GENERIC_ALL;
BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_EXECUTE_ = GENERIC_EXECUTE;
BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_WRITE_ = GENERIC_WRITE;
BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_READ_ = GENERIC_READ;
typedef ::ACCESS_MASK ACCESS_MASK_;
typedef ::PACCESS_MASK PACCESS_MASK_;
#else // defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST DWORD_ DELETE_ = 0x00010000;
BOOST_CONSTEXPR_OR_CONST DWORD_ READ_CONTROL_ = 0x00020000;
BOOST_CONSTEXPR_OR_CONST DWORD_ WRITE_DAC_ = 0x00040000;
BOOST_CONSTEXPR_OR_CONST DWORD_ WRITE_OWNER_ = 0x00080000;
BOOST_CONSTEXPR_OR_CONST DWORD_ SYNCHRONIZE_ = 0x00100000;
BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_ALL_ = 0x001F0000;
BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_EXECUTE_ = READ_CONTROL_;
BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_READ_ = READ_CONTROL_;
BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_REQUIRED_ = 0x000F0000;
BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_WRITE_ = READ_CONTROL_;
BOOST_CONSTEXPR_OR_CONST DWORD_ SPECIFIC_RIGHTS_ALL_ = 0x0000FFFF;
BOOST_CONSTEXPR_OR_CONST DWORD_ ACCESS_SYSTEM_SECURITY_ = 0x01000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ MAXIMUM_ALLOWED_ = 0x02000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_ALL_ = 0x10000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_EXECUTE_ = 0x20000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_WRITE_ = 0x40000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_READ_ = 0x80000000;
typedef DWORD_ ACCESS_MASK_;
typedef ACCESS_MASK_* PACCESS_MASK_;
#endif // defined( BOOST_USE_WINDOWS_H )
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_ACCESS_RIGHTS_HPP_INCLUDED_

View File

@@ -0,0 +1,47 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_APC_HPP_INCLUDED_
#define BOOST_WINAPI_APC_HPP_INCLUDED_
#include <boost/winapi/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/detail/header.hpp>
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
typedef boost::winapi::VOID_ (BOOST_WINAPI_NTAPI_CC *PAPCFUNC)(boost::winapi::ULONG_PTR_ Parameter);
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
QueueUserAPC(
PAPCFUNC pfnAPC,
boost::winapi::HANDLE_ hThread,
boost::winapi::ULONG_PTR_ dwData);
}
#endif
namespace boost {
namespace winapi {
typedef ::PAPCFUNC PAPCFUNC_;
using ::QueueUserAPC;
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
#endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
#endif // BOOST_WINAPI_APC_HPP_INCLUDED_

View File

@@ -0,0 +1,274 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015-2018 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_BASIC_TYPES_HPP_INCLUDED_
#define BOOST_WINAPI_BASIC_TYPES_HPP_INCLUDED_
#include <boost/winapi/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if defined(BOOST_USE_WINDOWS_H)
# include <windows.h>
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
# ifdef UNDER_CE
# ifndef WINAPI
# ifndef _WIN32_WCE_EMULATION
# define WINAPI __cdecl // Note this doesn't match the desktop definition
# else
# define WINAPI __stdcall
# endif
# endif
// Windows CE defines a few functions as inline functions in kfuncs.h
typedef int BOOL;
typedef unsigned long DWORD;
typedef void* HANDLE;
typedef HANDLE HGLOBAL;
typedef void* LPVOID;
# include <kfuncs.h>
# endif // UNDER_CE
#else
# error "Win32 functions not available"
#endif
#include <boost/winapi/detail/header.hpp>
#if defined(_M_IX86) || defined(__i386__)
#define BOOST_WINAPI_DETAIL_STDCALL __stdcall
#else
// On architectures other than 32-bit x86 __stdcall is ignored. Clang also issues a warning.
#define BOOST_WINAPI_DETAIL_STDCALL
#endif
#if defined(WINAPI)
#define BOOST_WINAPI_WINAPI_CC WINAPI
#else
#define BOOST_WINAPI_WINAPI_CC BOOST_WINAPI_DETAIL_STDCALL
#endif
#if defined(CALLBACK)
#define BOOST_WINAPI_CALLBACK_CC CALLBACK
#else
#define BOOST_WINAPI_CALLBACK_CC BOOST_WINAPI_DETAIL_STDCALL
#endif
#if defined(NTAPI)
#define BOOST_WINAPI_NTAPI_CC NTAPI
#else
#define BOOST_WINAPI_NTAPI_CC BOOST_WINAPI_DETAIL_STDCALL
#endif
#ifndef NO_STRICT
#ifndef STRICT
#define STRICT 1
#endif
#endif
#if defined(STRICT)
#define BOOST_WINAPI_DETAIL_DECLARE_HANDLE(x) struct x##__; typedef struct x##__ *x
#else
#define BOOST_WINAPI_DETAIL_DECLARE_HANDLE(x) typedef void* x
#endif
#if !defined(BOOST_USE_WINDOWS_H)
extern "C" {
union _LARGE_INTEGER;
struct _SECURITY_ATTRIBUTES;
BOOST_WINAPI_DETAIL_DECLARE_HANDLE(HINSTANCE);
typedef HINSTANCE HMODULE;
}
#endif
#if defined(__GNUC__)
#define BOOST_WINAPI_DETAIL_EXTENSION __extension__
#else
#define BOOST_WINAPI_DETAIL_EXTENSION
#endif
// MinGW64 gcc 4.8.2 fails to compile function declarations with boost::winapi::VOID_ arguments even though
// the typedef expands to void. In Windows SDK, VOID is a macro which unfolds to void. We use our own macro in such cases.
#define BOOST_WINAPI_DETAIL_VOID void
namespace boost {
namespace winapi {
#if defined(BOOST_USE_WINDOWS_H)
typedef ::BOOL BOOL_;
typedef ::PBOOL PBOOL_;
typedef ::LPBOOL LPBOOL_;
typedef ::BOOLEAN BOOLEAN_;
typedef ::PBOOLEAN PBOOLEAN_;
typedef ::BYTE BYTE_;
typedef ::PBYTE PBYTE_;
typedef ::LPBYTE LPBYTE_;
typedef ::UCHAR UCHAR_;
typedef ::PUCHAR PUCHAR_;
typedef ::WORD WORD_;
typedef ::PWORD PWORD_;
typedef ::LPWORD LPWORD_;
typedef ::DWORD DWORD_;
typedef ::PDWORD PDWORD_;
typedef ::LPDWORD LPDWORD_;
typedef ::HANDLE HANDLE_;
typedef ::PHANDLE PHANDLE_;
typedef ::SHORT SHORT_;
typedef ::PSHORT PSHORT_;
typedef ::USHORT USHORT_;
typedef ::PUSHORT PUSHORT_;
typedef ::INT INT_;
typedef ::PINT PINT_;
typedef ::LPINT LPINT_;
typedef ::UINT UINT_;
typedef ::PUINT PUINT_;
typedef ::LONG LONG_;
typedef ::PLONG PLONG_;
typedef ::LPLONG LPLONG_;
typedef ::ULONG ULONG_;
typedef ::PULONG PULONG_;
typedef ::LONGLONG ULONG64_;
typedef ::ULONGLONG PULONG64_;
typedef ::LONGLONG LONGLONG_;
typedef ::ULONGLONG ULONGLONG_;
typedef ::INT_PTR INT_PTR_;
typedef ::UINT_PTR UINT_PTR_;
typedef ::LONG_PTR LONG_PTR_;
typedef ::ULONG_PTR ULONG_PTR_;
typedef ::DWORD_PTR DWORD_PTR_;
typedef ::PDWORD_PTR PDWORD_PTR_;
typedef ::SIZE_T SIZE_T_;
typedef ::PSIZE_T PSIZE_T_;
typedef ::SSIZE_T SSIZE_T_;
typedef ::PSSIZE_T PSSIZE_T_;
typedef VOID VOID_; // VOID is a macro
typedef ::PVOID PVOID_;
typedef ::LPVOID LPVOID_;
typedef ::LPCVOID LPCVOID_;
typedef ::CHAR CHAR_;
typedef ::LPSTR LPSTR_;
typedef ::LPCSTR LPCSTR_;
typedef ::WCHAR WCHAR_;
typedef ::LPWSTR LPWSTR_;
typedef ::LPCWSTR LPCWSTR_;
#else // defined( BOOST_USE_WINDOWS_H )
typedef int BOOL_;
typedef BOOL_* PBOOL_;
typedef BOOL_* LPBOOL_;
typedef unsigned char BYTE_;
typedef BYTE_* PBYTE_;
typedef BYTE_* LPBYTE_;
typedef unsigned char UCHAR_;
typedef UCHAR_* PUCHAR_;
typedef BYTE_ BOOLEAN_;
typedef BOOLEAN_* PBOOLEAN_;
typedef unsigned short WORD_;
typedef WORD_* PWORD_;
typedef WORD_* LPWORD_;
#if !defined(__LP64__)
typedef unsigned long DWORD_;
#else
typedef unsigned int DWORD_;
#endif
typedef DWORD_* PDWORD_;
typedef DWORD_* LPDWORD_;
typedef void* HANDLE_;
typedef void** PHANDLE_;
typedef short SHORT_;
typedef SHORT_* PSHORT_;
typedef unsigned short USHORT_;
typedef USHORT_* PUSHORT_;
typedef int INT_;
typedef INT_* PINT_;
typedef INT_* LPINT_;
typedef unsigned int UINT_;
typedef UINT_* PUINT_;
#if !defined(__LP64__)
typedef long LONG_;
typedef unsigned long ULONG_;
#else
typedef int LONG_;
typedef unsigned int ULONG_;
#endif
typedef LONG_* PLONG_;
typedef LONG_* LPLONG_;
typedef ULONG_* PULONG_;
#if defined(BOOST_HAS_MS_INT64)
BOOST_WINAPI_DETAIL_EXTENSION typedef __int64 LONGLONG_;
BOOST_WINAPI_DETAIL_EXTENSION typedef unsigned __int64 ULONGLONG_;
#else
BOOST_WINAPI_DETAIL_EXTENSION typedef long long LONGLONG_;
BOOST_WINAPI_DETAIL_EXTENSION typedef unsigned long long ULONGLONG_;
#endif
typedef LONGLONG_ LONG64_, *PLONG64_;
typedef ULONGLONG_ ULONG64_, *PULONG64_;
#if defined(_WIN64)
typedef LONGLONG_ INT_PTR_;
typedef ULONGLONG_ UINT_PTR_;
typedef LONGLONG_ LONG_PTR_;
typedef ULONGLONG_ ULONG_PTR_;
#else
typedef int INT_PTR_;
typedef unsigned int UINT_PTR_;
typedef long LONG_PTR_;
typedef unsigned long ULONG_PTR_;
#endif
typedef ULONG_PTR_ DWORD_PTR_, *PDWORD_PTR_;
typedef ULONG_PTR_ SIZE_T_, *PSIZE_T_;
typedef LONG_PTR_ SSIZE_T_, *PSSIZE_T_;
typedef void VOID_;
typedef void *PVOID_;
typedef void *LPVOID_;
typedef const void *LPCVOID_;
typedef char CHAR_;
typedef CHAR_ *LPSTR_;
typedef const CHAR_ *LPCSTR_;
typedef wchar_t WCHAR_;
typedef WCHAR_ *LPWSTR_;
typedef const WCHAR_ *LPCWSTR_;
#endif // defined( BOOST_USE_WINDOWS_H )
// ::NTSTATUS is defined in ntdef.h or winternl.h in different Windows SDKs, and is not included by windows.h by default, so always use LONG_
typedef LONG_ NTSTATUS_;
typedef NTSTATUS_ *PNTSTATUS_;
typedef ::HMODULE HMODULE_;
typedef union BOOST_MAY_ALIAS _LARGE_INTEGER {
BOOST_WINAPI_DETAIL_EXTENSION struct {
DWORD_ LowPart;
LONG_ HighPart;
};
struct {
DWORD_ LowPart;
LONG_ HighPart;
} u;
LONGLONG_ QuadPart;
} LARGE_INTEGER_, *PLARGE_INTEGER_;
typedef struct BOOST_MAY_ALIAS _SECURITY_ATTRIBUTES {
DWORD_ nLength;
LPVOID_ lpSecurityDescriptor;
BOOL_ bInheritHandle;
} SECURITY_ATTRIBUTES_, *PSECURITY_ATTRIBUTES_, *LPSECURITY_ATTRIBUTES_;
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_BASIC_TYPES_HPP_INCLUDED_

View File

@@ -0,0 +1,89 @@
/*
* Copyright 2017 James E. King, III
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_BCRYPT_HPP_INCLUDED_
#define BOOST_WINAPI_BCRYPT_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
#if defined(BOOST_USE_WINDOWS_H)
#include <bcrypt.h>
#endif
#include <boost/winapi/detail/header.hpp>
#if defined(BOOST_USE_WINDOWS_H)
namespace boost { namespace winapi {
typedef ::BCRYPT_ALG_HANDLE BCRYPT_ALG_HANDLE_;
}}
#else // defined(BOOST_USE_WINDOWS_H)
namespace boost { namespace winapi {
typedef PVOID_ BCRYPT_ALG_HANDLE_;
}}
extern "C" {
boost::winapi::NTSTATUS_ BOOST_WINAPI_WINAPI_CC
BCryptCloseAlgorithmProvider(
boost::winapi::BCRYPT_ALG_HANDLE_ hAlgorithm,
boost::winapi::ULONG_ dwFlags
);
boost::winapi::NTSTATUS_ BOOST_WINAPI_WINAPI_CC
BCryptGenRandom(
boost::winapi::BCRYPT_ALG_HANDLE_ hAlgorithm,
boost::winapi::PUCHAR_ pbBuffer,
boost::winapi::ULONG_ cbBuffer,
boost::winapi::ULONG_ dwFlags
);
boost::winapi::NTSTATUS_ BOOST_WINAPI_WINAPI_CC
BCryptOpenAlgorithmProvider(
boost::winapi::BCRYPT_ALG_HANDLE_ *phAlgorithm,
boost::winapi::LPCWSTR_ pszAlgId,
boost::winapi::LPCWSTR_ pszImplementation,
boost::winapi::DWORD_ dwFlags
);
} // extern "C"
#endif // defined(BOOST_USE_WINDOWS_H)
namespace boost {
namespace winapi {
#if defined(BOOST_USE_WINDOWS_H)
const WCHAR_ BCRYPT_RNG_ALGORITHM_[] = BCRYPT_RNG_ALGORITHM;
#else
const WCHAR_ BCRYPT_RNG_ALGORITHM_[] = L"RNG";
#endif
using ::BCryptCloseAlgorithmProvider;
using ::BCryptGenRandom;
using ::BCryptOpenAlgorithmProvider;
} // winapi
} // boost
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
#endif // BOOST_WINAPI_BCRYPT_HPP_INCLUDED_

View File

@@ -0,0 +1,108 @@
/*
* Copyright 2016 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_CHARACTER_CODE_CONVERSION_HPP_INCLUDED_
#define BOOST_WINAPI_CHARACTER_CODE_CONVERSION_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
BOOST_WINAPI_IMPORT_EXCEPT_WM int BOOST_WINAPI_WINAPI_CC
MultiByteToWideChar(
boost::winapi::UINT_ CodePage,
boost::winapi::DWORD_ dwFlags,
boost::winapi::LPCSTR_ lpMultiByteStr,
int cbMultiByte,
boost::winapi::LPWSTR_ lpWideCharStr,
int cchWideChar);
BOOST_WINAPI_IMPORT_EXCEPT_WM int BOOST_WINAPI_WINAPI_CC
WideCharToMultiByte(
boost::winapi::UINT_ CodePage,
boost::winapi::DWORD_ dwFlags,
boost::winapi::LPCWSTR_ lpWideCharStr,
int cchWideChar,
boost::winapi::LPSTR_ lpMultiByteStr,
int cbMultiByte,
boost::winapi::LPCSTR_ lpDefaultChar,
boost::winapi::LPBOOL_ lpUsedDefaultChar);
} // extern "C"
#endif // #if !defined( BOOST_USE_WINDOWS_H )
namespace boost {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST UINT_ CP_ACP_ = CP_ACP;
BOOST_CONSTEXPR_OR_CONST UINT_ CP_OEMCP_ = CP_OEMCP;
BOOST_CONSTEXPR_OR_CONST UINT_ CP_MACCP_ = CP_MACCP;
BOOST_CONSTEXPR_OR_CONST UINT_ CP_THREAD_ACP_ = CP_THREAD_ACP;
BOOST_CONSTEXPR_OR_CONST UINT_ CP_SYMBOL_ = CP_SYMBOL;
BOOST_CONSTEXPR_OR_CONST UINT_ CP_UTF7_ = CP_UTF7;
BOOST_CONSTEXPR_OR_CONST UINT_ CP_UTF8_ = CP_UTF8;
BOOST_CONSTEXPR_OR_CONST DWORD_ MB_PRECOMPOSED_ = MB_PRECOMPOSED;
BOOST_CONSTEXPR_OR_CONST DWORD_ MB_COMPOSITE_ = MB_COMPOSITE;
BOOST_CONSTEXPR_OR_CONST DWORD_ MB_USEGLYPHCHARS_ = MB_USEGLYPHCHARS;
BOOST_CONSTEXPR_OR_CONST DWORD_ MB_ERR_INVALID_CHARS_ = MB_ERR_INVALID_CHARS;
BOOST_CONSTEXPR_OR_CONST DWORD_ WC_COMPOSITECHECK_ = WC_COMPOSITECHECK;
BOOST_CONSTEXPR_OR_CONST DWORD_ WC_DISCARDNS_ = WC_DISCARDNS;
BOOST_CONSTEXPR_OR_CONST DWORD_ WC_SEPCHARS_ = WC_SEPCHARS;
BOOST_CONSTEXPR_OR_CONST DWORD_ WC_DEFAULTCHAR_ = WC_DEFAULTCHAR;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN2K
BOOST_CONSTEXPR_OR_CONST DWORD_ WC_NO_BEST_FIT_CHARS_ = WC_NO_BEST_FIT_CHARS;
#endif
#else // defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST UINT_ CP_ACP_ = 0u;
BOOST_CONSTEXPR_OR_CONST UINT_ CP_OEMCP_ = 1u;
BOOST_CONSTEXPR_OR_CONST UINT_ CP_MACCP_ = 2u;
BOOST_CONSTEXPR_OR_CONST UINT_ CP_THREAD_ACP_ = 3u;
BOOST_CONSTEXPR_OR_CONST UINT_ CP_SYMBOL_ = 42u;
BOOST_CONSTEXPR_OR_CONST UINT_ CP_UTF7_ = 65000u;
BOOST_CONSTEXPR_OR_CONST UINT_ CP_UTF8_ = 65001u;
BOOST_CONSTEXPR_OR_CONST DWORD_ MB_PRECOMPOSED_ = 0x00000001;
BOOST_CONSTEXPR_OR_CONST DWORD_ MB_COMPOSITE_ = 0x00000002;
BOOST_CONSTEXPR_OR_CONST DWORD_ MB_USEGLYPHCHARS_ = 0x00000004;
BOOST_CONSTEXPR_OR_CONST DWORD_ MB_ERR_INVALID_CHARS_ = 0x00000008;
BOOST_CONSTEXPR_OR_CONST DWORD_ WC_COMPOSITECHECK_ = 0x00000200;
BOOST_CONSTEXPR_OR_CONST DWORD_ WC_DISCARDNS_ = 0x00000010;
BOOST_CONSTEXPR_OR_CONST DWORD_ WC_SEPCHARS_ = 0x00000020;
BOOST_CONSTEXPR_OR_CONST DWORD_ WC_DEFAULTCHAR_ = 0x00000040;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN2K
BOOST_CONSTEXPR_OR_CONST DWORD_ WC_NO_BEST_FIT_CHARS_ = 0x00000400;
#endif
#endif // defined( BOOST_USE_WINDOWS_H )
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
// This constant is not present in MinGW
BOOST_CONSTEXPR_OR_CONST DWORD_ WC_ERR_INVALID_CHARS_ = 0x00000080;
#endif
using ::MultiByteToWideChar;
using ::WideCharToMultiByte;
} // namespace winapi
} // namespace boost
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_CHARACTER_CODE_CONVERSION_HPP_INCLUDED_

View File

@@ -0,0 +1,123 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_CONDITION_VARIABLE_HPP_INCLUDED_
#define BOOST_WINAPI_CONDITION_VARIABLE_HPP_INCLUDED_
#include <boost/winapi/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/detail/header.hpp>
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
struct _RTL_CONDITION_VARIABLE;
struct _RTL_CRITICAL_SECTION;
struct _RTL_SRWLOCK;
BOOST_WINAPI_IMPORT boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
InitializeConditionVariable(::_RTL_CONDITION_VARIABLE* ConditionVariable);
BOOST_WINAPI_IMPORT boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
WakeConditionVariable(::_RTL_CONDITION_VARIABLE* ConditionVariable);
BOOST_WINAPI_IMPORT boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
WakeAllConditionVariable(::_RTL_CONDITION_VARIABLE* ConditionVariable);
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
SleepConditionVariableCS(
::_RTL_CONDITION_VARIABLE* ConditionVariable,
::_RTL_CRITICAL_SECTION* CriticalSection,
boost::winapi::DWORD_ dwMilliseconds);
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
SleepConditionVariableSRW(
::_RTL_CONDITION_VARIABLE* ConditionVariable,
::_RTL_SRWLOCK* SRWLock,
boost::winapi::DWORD_ dwMilliseconds,
boost::winapi::ULONG_ Flags);
}
#endif
namespace boost {
namespace winapi {
typedef struct BOOST_MAY_ALIAS _RTL_CONDITION_VARIABLE {
PVOID_ Ptr;
} CONDITION_VARIABLE_, *PCONDITION_VARIABLE_;
#if defined( BOOST_USE_WINDOWS_H )
#define BOOST_WINAPI_CONDITION_VARIABLE_INIT CONDITION_VARIABLE_INIT
#else
#define BOOST_WINAPI_CONDITION_VARIABLE_INIT {0}
#endif
struct _RTL_CRITICAL_SECTION;
struct _RTL_SRWLOCK;
BOOST_FORCEINLINE VOID_ InitializeConditionVariable(PCONDITION_VARIABLE_ ConditionVariable)
{
::InitializeConditionVariable(reinterpret_cast< ::_RTL_CONDITION_VARIABLE* >(ConditionVariable));
}
BOOST_FORCEINLINE VOID_ WakeConditionVariable(PCONDITION_VARIABLE_ ConditionVariable)
{
::WakeConditionVariable(reinterpret_cast< ::_RTL_CONDITION_VARIABLE* >(ConditionVariable));
}
BOOST_FORCEINLINE VOID_ WakeAllConditionVariable(PCONDITION_VARIABLE_ ConditionVariable)
{
::WakeAllConditionVariable(reinterpret_cast< ::_RTL_CONDITION_VARIABLE* >(ConditionVariable));
}
BOOST_FORCEINLINE BOOL_ SleepConditionVariableCS(
PCONDITION_VARIABLE_ ConditionVariable,
_RTL_CRITICAL_SECTION* CriticalSection,
DWORD_ dwMilliseconds)
{
return ::SleepConditionVariableCS(
reinterpret_cast< ::_RTL_CONDITION_VARIABLE* >(ConditionVariable),
reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(CriticalSection),
dwMilliseconds);
}
BOOST_FORCEINLINE BOOL_ SleepConditionVariableSRW(
PCONDITION_VARIABLE_ ConditionVariable,
_RTL_SRWLOCK* SRWLock,
DWORD_ dwMilliseconds,
ULONG_ Flags)
{
return ::SleepConditionVariableSRW(
reinterpret_cast< ::_RTL_CONDITION_VARIABLE* >(ConditionVariable),
reinterpret_cast< ::_RTL_SRWLOCK* >(SRWLock),
dwMilliseconds,
Flags);
}
#if defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST ULONG_ CONDITION_VARIABLE_LOCKMODE_SHARED_ = CONDITION_VARIABLE_LOCKMODE_SHARED;
#else // defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST ULONG_ CONDITION_VARIABLE_LOCKMODE_SHARED_ = 0x00000001;
#endif // defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST ULONG_ condition_variable_lockmode_shared = CONDITION_VARIABLE_LOCKMODE_SHARED_;
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
#endif // BOOST_WINAPI_CONDITION_VARIABLE_HPP_INCLUDED_

View File

@@ -0,0 +1,245 @@
/*
* Copyright 2013, 2017 Andrey Semashev
* Copyright 2017 James E. King, III
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_CONFIG_HPP_INCLUDED_
#define BOOST_WINAPI_CONFIG_HPP_INCLUDED_
#include <boost/predef/version_number.h>
#include <boost/predef/platform.h>
#if defined(__CYGWIN__)
// Cygwin 64 compiler does not define _WIN64 and instead defines it in a private header. We can't define _WIN64 ourselves because
// the header defines the macro unconditionally and if the user includes both Boost.WinAPI and Cygwin WinAPI headers there will be conflict.
#include <_cygwin.h>
#endif
#if defined(__MINGW32__)
// MinGW and MinGW-w64 define __MINGW32_VERSION_MAJOR/MINOR and __MINGW64_VERSION_MAJOR/MINOR macros in a private header.
#include <_mingw.h>
#endif
// BOOST_WINAPI_IS_MINGW indicates that the target Windows SDK is provided by MinGW (http://mingw.org/).
// BOOST_WINAPI_IS_MINGW_W64 indicates that the target Windows SDK is provided by MinGW-w64 (http://mingw-w64.org).
// BOOST_WINAPI_IS_CYGWIN indicates that the target Windows SDK is provided by MinGW variant from Cygwin (https://cygwin.com/).
#if defined(__CYGWIN__)
#define BOOST_WINAPI_IS_CYGWIN
#elif BOOST_PLAT_MINGW
#if defined(__MINGW64_VERSION_MAJOR)
#define BOOST_WINAPI_IS_MINGW_W64
#else
#define BOOST_WINAPI_IS_MINGW
#endif
#endif
// These constants reflect _WIN32_WINNT_* macros from sdkddkver.h
// See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx#setting_winver_or__win32_winnt
#define BOOST_WINAPI_VERSION_NT4 0x0400
#define BOOST_WINAPI_VERSION_WIN2K 0x0500
#define BOOST_WINAPI_VERSION_WINXP 0x0501
#define BOOST_WINAPI_VERSION_WS03 0x0502
#define BOOST_WINAPI_VERSION_WIN6 0x0600
#define BOOST_WINAPI_VERSION_VISTA 0x0600
#define BOOST_WINAPI_VERSION_WS08 0x0600
#define BOOST_WINAPI_VERSION_LONGHORN 0x0600
#define BOOST_WINAPI_VERSION_WIN7 0x0601
#define BOOST_WINAPI_VERSION_WIN8 0x0602
#define BOOST_WINAPI_VERSION_WINBLUE 0x0603
#define BOOST_WINAPI_VERSION_WINTHRESHOLD 0x0A00
#define BOOST_WINAPI_VERSION_WIN10 0x0A00
// These constants reflect NTDDI_* macros from sdkddkver.h
#define BOOST_WINAPI_NTDDI_WIN2K 0x05000000
#define BOOST_WINAPI_NTDDI_WIN2KSP1 0x05000100
#define BOOST_WINAPI_NTDDI_WIN2KSP2 0x05000200
#define BOOST_WINAPI_NTDDI_WIN2KSP3 0x05000300
#define BOOST_WINAPI_NTDDI_WIN2KSP4 0x05000400
#define BOOST_WINAPI_NTDDI_WINXP 0x05010000
#define BOOST_WINAPI_NTDDI_WINXPSP1 0x05010100
#define BOOST_WINAPI_NTDDI_WINXPSP2 0x05010200
#define BOOST_WINAPI_NTDDI_WINXPSP3 0x05010300
#define BOOST_WINAPI_NTDDI_WINXPSP4 0x05010400
#define BOOST_WINAPI_NTDDI_WS03 0x05020000
#define BOOST_WINAPI_NTDDI_WS03SP1 0x05020100
#define BOOST_WINAPI_NTDDI_WS03SP2 0x05020200
#define BOOST_WINAPI_NTDDI_WS03SP3 0x05020300
#define BOOST_WINAPI_NTDDI_WS03SP4 0x05020400
#define BOOST_WINAPI_NTDDI_WIN6 0x06000000
#define BOOST_WINAPI_NTDDI_WIN6SP1 0x06000100
#define BOOST_WINAPI_NTDDI_WIN6SP2 0x06000200
#define BOOST_WINAPI_NTDDI_WIN6SP3 0x06000300
#define BOOST_WINAPI_NTDDI_WIN6SP4 0x06000400
#define BOOST_WINAPI_NTDDI_VISTA BOOST_WINAPI_NTDDI_WIN6
#define BOOST_WINAPI_NTDDI_VISTASP1 BOOST_WINAPI_NTDDI_WIN6SP1
#define BOOST_WINAPI_NTDDI_VISTASP2 BOOST_WINAPI_NTDDI_WIN6SP2
#define BOOST_WINAPI_NTDDI_VISTASP3 BOOST_WINAPI_NTDDI_WIN6SP3
#define BOOST_WINAPI_NTDDI_VISTASP4 BOOST_WINAPI_NTDDI_WIN6SP4
#define BOOST_WINAPI_NTDDI_LONGHORN BOOST_WINAPI_NTDDI_VISTA
#define BOOST_WINAPI_NTDDI_WS08 BOOST_WINAPI_NTDDI_WIN6SP1
#define BOOST_WINAPI_NTDDI_WS08SP2 BOOST_WINAPI_NTDDI_WIN6SP2
#define BOOST_WINAPI_NTDDI_WS08SP3 BOOST_WINAPI_NTDDI_WIN6SP3
#define BOOST_WINAPI_NTDDI_WS08SP4 BOOST_WINAPI_NTDDI_WIN6SP4
#define BOOST_WINAPI_NTDDI_WIN7 0x06010000
#define BOOST_WINAPI_NTDDI_WIN7SP1 0x06010100 // Not defined in Windows SDK
#define BOOST_WINAPI_NTDDI_WIN8 0x06020000
#define BOOST_WINAPI_NTDDI_WINBLUE 0x06030000
#define BOOST_WINAPI_NTDDI_WINTHRESHOLD 0x0A000000
#define BOOST_WINAPI_NTDDI_WIN10 0x0A000000
#define BOOST_WINAPI_NTDDI_WIN10_TH2 0x0A000001
#define BOOST_WINAPI_NTDDI_WIN10_RS1 0x0A000002
#define BOOST_WINAPI_NTDDI_WIN10_RS2 0x0A000003
#define BOOST_WINAPI_NTDDI_WIN10_RS3 0x0A000004
#define BOOST_WINAPI_DETAIL_MAKE_NTDDI_VERSION2(x) x##0000
#define BOOST_WINAPI_DETAIL_MAKE_NTDDI_VERSION(x) BOOST_WINAPI_DETAIL_MAKE_NTDDI_VERSION2(x)
#if !defined(BOOST_USE_WINAPI_VERSION)
#if defined(_WIN32_WINNT)
#define BOOST_USE_WINAPI_VERSION _WIN32_WINNT
#elif defined(WINVER)
#define BOOST_USE_WINAPI_VERSION WINVER
#else
// By default use Windows 7 API on compilers that support it and Vista or XP on the others
#if (defined(_MSC_VER) && _MSC_VER < 1500) || defined(BOOST_WINAPI_IS_MINGW)
#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WINXP
#elif (defined(_MSC_VER) && _MSC_VER < 1600)
#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN6
#else
#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN7
#endif
#endif
#endif
#if !defined(BOOST_USE_NTDDI_VERSION)
#if defined(NTDDI_VERSION)
#define BOOST_USE_NTDDI_VERSION NTDDI_VERSION
// Default to respective Windows version with the latest Service Pack
#elif BOOST_USE_WINAPI_VERSION == BOOST_WINAPI_VERSION_WIN2K
#define BOOST_USE_NTDDI_VERSION BOOST_WINAPI_NTDDI_WIN2KSP4
#elif BOOST_USE_WINAPI_VERSION == BOOST_WINAPI_VERSION_WINXP
#define BOOST_USE_NTDDI_VERSION BOOST_WINAPI_NTDDI_WINXPSP3
#elif BOOST_USE_WINAPI_VERSION == BOOST_WINAPI_VERSION_WS03
#define BOOST_USE_NTDDI_VERSION BOOST_WINAPI_NTDDI_WS03SP2
#elif BOOST_USE_WINAPI_VERSION == BOOST_WINAPI_VERSION_WIN6
#define BOOST_USE_NTDDI_VERSION BOOST_WINAPI_NTDDI_WIN6SP2
#elif BOOST_USE_WINAPI_VERSION == BOOST_WINAPI_VERSION_WIN7
#define BOOST_USE_NTDDI_VERSION BOOST_WINAPI_NTDDI_WIN7SP1
#elif BOOST_USE_WINAPI_VERSION == BOOST_WINAPI_VERSION_WIN10
#define BOOST_USE_NTDDI_VERSION BOOST_WINAPI_NTDDI_WIN10_RS3
#else
#define BOOST_USE_NTDDI_VERSION BOOST_WINAPI_DETAIL_MAKE_NTDDI_VERSION(BOOST_USE_WINAPI_VERSION)
#endif
#endif
// Known Windows SDK versions, taken from VER_PRODUCTBUILD macro value defined in ntverp.h.
// These values can be used to compare with BOOST_PLAT_WINDOWS_SDK_VERSION from Boost.Predef.
#define BOOST_WINAPI_WINDOWS_SDK_MSVC71 BOOST_VERSION_NUMBER(0, 0, 3668) // Windows SDK bundled with MSVC 7.1
#define BOOST_WINAPI_WINDOWS_SDK_MSVC8 BOOST_VERSION_NUMBER(0, 0, 3790) // Windows SDK bundled with MSVC 8
#define BOOST_WINAPI_WINDOWS_SDK_6_0 BOOST_VERSION_NUMBER(0, 0, 6000) // Windows SDK 6.0
#define BOOST_WINAPI_WINDOWS_SDK_7_0 BOOST_VERSION_NUMBER(0, 0, 7600) // Windows SDK 7.0, 7.1
#define BOOST_WINAPI_WINDOWS_SDK_8_0 BOOST_VERSION_NUMBER(0, 0, 9200) // Windows SDK 8.0
#define BOOST_WINAPI_WINDOWS_SDK_8_1 BOOST_VERSION_NUMBER(0, 0, 9600) // Windows SDK 8.1
#define BOOST_WINAPI_WINDOWS_SDK_10_0 BOOST_VERSION_NUMBER(0, 0, 10011) // Windows SDK 10.0
// MinGW does not have the ntverp.h header but it defines VER_PRODUCTBUILD in ddk/ntifs.h.
// Cygwin MinGW also defines this version.
#define BOOST_WINAPI_WINDOWS_SDK_MINGW BOOST_VERSION_NUMBER(0, 0, 10000)
// MinGW-w64 defines the same version as the Windows SDK bundled with MSVC 8
#define BOOST_WINAPI_WINDOWS_SDK_MINGW_W64 BOOST_VERSION_NUMBER(0, 0, 3790)
#if !defined(BOOST_USE_WINAPI_FAMILY)
#if defined(WINAPI_FAMILY)
#define BOOST_USE_WINAPI_FAMILY WINAPI_FAMILY
#elif defined(WINAPI_FAMILY_DESKTOP_APP)
// If none is specified, default to a desktop application which is the most
// backwards compatible to previous ways of doing things, if families are even
// defined.
#define BOOST_USE_WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
#endif
#endif
//
// UWP Support
//
// On platforms without windows family partition support it is assumed one
// has all APIs and access is controlled by _WIN32_WINNT or similar mechanisms.
//
// Leveraging Boost.Predef here
//
#if BOOST_PLAT_WINDOWS_UWP
#define BOOST_WINAPI_PARTITION_APP (BOOST_PLAT_WINDOWS_DESKTOP || BOOST_PLAT_WINDOWS_STORE || BOOST_WINAPI_PARTITION_PHONE)
#define BOOST_WINAPI_PARTITION_PC (BOOST_PLAT_WINDOWS_STORE)
#define BOOST_WINAPI_PARTITION_PHONE (BOOST_PLAT_WINDOWS_PHONE)
#define BOOST_WINAPI_PARTITION_SYSTEM (BOOST_PLAT_WINDOWS_SYSTEM)
#define BOOST_WINAPI_PARTITION_SERVER (BOOST_PLAT_WINDOWS_SERVER)
#define BOOST_WINAPI_PARTITION_DESKTOP (BOOST_PLAT_WINDOWS_DESKTOP)
#else // BOOST_PLAT_WINDOWS_UWP
#define BOOST_WINAPI_PARTITION_APP (1)
#define BOOST_WINAPI_PARTITION_PC (1)
#define BOOST_WINAPI_PARTITION_PHONE (1)
#define BOOST_WINAPI_PARTITION_SYSTEM (1)
#define BOOST_WINAPI_PARTITION_SERVER (1)
#define BOOST_WINAPI_PARTITION_DESKTOP (1)
#endif // BOOST_PLAT_WINDOWS_UWP
//
// Windows 8.x SDK defines some items in the DESKTOP partition and then Windows SDK 10.0 defines
// the same items to be in APP or SYSTEM partitions, and APP expands to DESKTOP or PC or PHONE.
// The definition of BOOST_WINAPI_PARTITION_APP_SYSTEM provides a universal way to get this
// right as it is seen in a number of places in the SDK.
//
#define BOOST_WINAPI_PARTITION_APP_SYSTEM \
( \
((BOOST_PLAT_WINDOWS_SDK_VERSION >= BOOST_WINAPI_WINDOWS_SDK_10_0) && (BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM)) || \
((BOOST_PLAT_WINDOWS_SDK_VERSION < BOOST_WINAPI_WINDOWS_SDK_10_0) && BOOST_WINAPI_PARTITION_DESKTOP) \
)
// Simiarly, some other symbols were re-classified as DESKTOP or SYSTEM
#define BOOST_WINAPI_PARTITION_DESKTOP_SYSTEM \
( \
((BOOST_PLAT_WINDOWS_SDK_VERSION >= BOOST_WINAPI_WINDOWS_SDK_10_0) && (BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM)) || \
((BOOST_PLAT_WINDOWS_SDK_VERSION < BOOST_WINAPI_WINDOWS_SDK_10_0) && BOOST_WINAPI_PARTITION_DESKTOP) \
)
#if defined(BOOST_USE_WINDOWS_H) || defined(BOOST_WINAPI_DEFINE_VERSION_MACROS)
// We have to define the version macros so that windows.h provides the necessary symbols
#if !defined(_WIN32_WINNT)
#define _WIN32_WINNT BOOST_USE_WINAPI_VERSION
#endif
#if !defined(WINVER)
#define WINVER BOOST_USE_WINAPI_VERSION
#endif
#if !defined(NTDDI_VERSION)
#define NTDDI_VERSION BOOST_USE_NTDDI_VERSION
#endif
#if !defined(WINAPI_FAMILY) && defined(BOOST_USE_WINAPI_FAMILY)
#define WINAPI_FAMILY BOOST_USE_WINAPI_FAMILY
#endif
#endif
#if defined (WIN32_PLATFORM_PSPC)
#define BOOST_WINAPI_IMPORT BOOST_SYMBOL_IMPORT
#define BOOST_WINAPI_IMPORT_EXCEPT_WM
#elif defined (_WIN32_WCE)
#define BOOST_WINAPI_IMPORT
#define BOOST_WINAPI_IMPORT_EXCEPT_WM
#else
#define BOOST_WINAPI_IMPORT BOOST_SYMBOL_IMPORT
#define BOOST_WINAPI_IMPORT_EXCEPT_WM BOOST_SYMBOL_IMPORT
#endif
#include <boost/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_WINAPI_CONFIG_HPP_INCLUDED_

View File

@@ -0,0 +1,240 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_CRITICAL_SECTION_HPP_INCLUDED_
#define BOOST_WINAPI_CRITICAL_SECTION_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/detail/cast_ptr.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_WINAPI_IS_MINGW )
// Windows CE uses a different name for the structure
#if defined (_WIN32_WCE)
struct CRITICAL_SECTION;
namespace boost {
namespace winapi {
namespace detail {
typedef CRITICAL_SECTION winsdk_critical_section;
}
}
}
#else
struct _RTL_CRITICAL_SECTION;
namespace boost {
namespace winapi {
namespace detail {
typedef _RTL_CRITICAL_SECTION winsdk_critical_section;
}
}
}
#endif
#else
// MinGW uses a different name for the structure
struct _CRITICAL_SECTION;
namespace boost {
namespace winapi {
namespace detail {
typedef _CRITICAL_SECTION winapi_critical_section;
}
}
}
#endif
#if !defined( BOOST_WINAPI_IS_MINGW )
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
InitializeCriticalSection(boost::winapi::detail::winsdk_critical_section* lpCriticalSection);
#endif
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
EnterCriticalSection(boost::winapi::detail::winsdk_critical_section* lpCriticalSection);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
LeaveCriticalSection(boost::winapi::detail::winsdk_critical_section* lpCriticalSection);
#if BOOST_USE_WINAPI_VERSION >= 0x0403
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
InitializeCriticalSectionAndSpinCount(
boost::winapi::detail::winsdk_critical_section* lpCriticalSection,
boost::winapi::DWORD_ dwSpinCount);
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
SetCriticalSectionSpinCount(
boost::winapi::detail::winsdk_critical_section* lpCriticalSection,
boost::winapi::DWORD_ dwSpinCount);
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
InitializeCriticalSectionEx(
boost::winapi::detail::winsdk_critical_section* lpCriticalSection,
boost::winapi::DWORD_ dwSpinCount,
boost::winapi::DWORD_ Flags);
#endif
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
TryEnterCriticalSection(boost::winapi::detail::winsdk_critical_section* lpCriticalSection);
#endif
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
DeleteCriticalSection(boost::winapi::detail::winsdk_critical_section* lpCriticalSection);
#else // defined( BOOST_WINAPI_IS_MINGW )
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
InitializeCriticalSection(boost::winapi::detail::winapi_critical_section* lpCriticalSection);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
EnterCriticalSection(boost::winapi::detail::winapi_critical_section* lpCriticalSection);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
LeaveCriticalSection(boost::winapi::detail::winapi_critical_section* lpCriticalSection);
#if BOOST_USE_WINAPI_VERSION >= 0x0403
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
InitializeCriticalSectionAndSpinCount(
boost::winapi::detail::winapi_critical_section* lpCriticalSection,
boost::winapi::DWORD_ dwSpinCount);
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
SetCriticalSectionSpinCount(
boost::winapi::detail::winapi_critical_section* lpCriticalSection,
boost::winapi::DWORD_ dwSpinCount);
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
InitializeCriticalSectionEx(
boost::winapi::detail::winapi_critical_section* lpCriticalSection,
boost::winapi::DWORD_ dwSpinCount,
boost::winapi::DWORD_ Flags);
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
TryEnterCriticalSection(boost::winapi::detail::winapi_critical_section* lpCriticalSection);
#endif
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
DeleteCriticalSection(boost::winapi::detail::winapi_critical_section* lpCriticalSection);
#endif // defined( BOOST_WINAPI_IS_MINGW )
} // extern "C"
#endif
namespace boost {
namespace winapi {
#pragma pack(push, 8)
#if !defined(_WIN32_WCE)
struct _RTL_CRITICAL_SECTION_DEBUG;
typedef struct BOOST_MAY_ALIAS _RTL_CRITICAL_SECTION {
_RTL_CRITICAL_SECTION_DEBUG* DebugInfo;
LONG_ LockCount;
LONG_ RecursionCount;
HANDLE_ OwningThread;
HANDLE_ LockSemaphore;
ULONG_PTR_ SpinCount;
} CRITICAL_SECTION_, *PCRITICAL_SECTION_;
#else
// Windows CE has different layout
typedef struct BOOST_MAY_ALIAS CRITICAL_SECTION {
unsigned int LockCount;
HANDLE OwnerThread;
HANDLE hCrit;
DWORD needtrap;
DWORD dwContentions;
} CRITICAL_SECTION_, *LPCRITICAL_SECTION_;
#endif
#pragma pack(pop)
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
BOOST_FORCEINLINE VOID_ InitializeCriticalSection(CRITICAL_SECTION_* lpCriticalSection)
{
::InitializeCriticalSection(winapi::detail::cast_ptr(lpCriticalSection));
}
#endif
BOOST_FORCEINLINE VOID_ EnterCriticalSection(CRITICAL_SECTION_* lpCriticalSection)
{
::EnterCriticalSection(winapi::detail::cast_ptr(lpCriticalSection));
}
BOOST_FORCEINLINE VOID_ LeaveCriticalSection(CRITICAL_SECTION_* lpCriticalSection)
{
::LeaveCriticalSection(winapi::detail::cast_ptr(lpCriticalSection));
}
#if BOOST_USE_WINAPI_VERSION >= 0x0403
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
BOOST_FORCEINLINE BOOL_ InitializeCriticalSectionAndSpinCount(CRITICAL_SECTION_* lpCriticalSection, DWORD_ dwSpinCount)
{
return ::InitializeCriticalSectionAndSpinCount(winapi::detail::cast_ptr(lpCriticalSection), dwSpinCount);
}
BOOST_FORCEINLINE DWORD_ SetCriticalSectionSpinCount(CRITICAL_SECTION_* lpCriticalSection, DWORD_ dwSpinCount)
{
return ::SetCriticalSectionSpinCount(winapi::detail::cast_ptr(lpCriticalSection), dwSpinCount);
}
#endif
// CRITICAL_SECTION_NO_DEBUG_INFO is defined for WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
BOOST_CONSTEXPR_OR_CONST DWORD_ CRITICAL_SECTION_NO_DEBUG_INFO_ = 0x01000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ CRITICAL_SECTION_FLAG_NO_DEBUG_INFO_ = CRITICAL_SECTION_NO_DEBUG_INFO_;
BOOST_CONSTEXPR_OR_CONST DWORD_ CRITICAL_SECTION_FLAG_DYNAMIC_SPIN_ = 0x02000000; // undocumented
BOOST_CONSTEXPR_OR_CONST DWORD_ CRITICAL_SECTION_FLAG_STATIC_INIT_ = 0x04000000; // undocumented
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_FORCEINLINE BOOL_ InitializeCriticalSectionEx(CRITICAL_SECTION_* lpCriticalSection, DWORD_ dwSpinCount, DWORD_ Flags)
{
return ::InitializeCriticalSectionEx(winapi::detail::cast_ptr(lpCriticalSection), dwSpinCount, Flags);
}
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
#endif // BOOST_USE_WINAPI_VERSION >= 0x0403
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
BOOST_FORCEINLINE BOOL_ TryEnterCriticalSection(CRITICAL_SECTION_* lpCriticalSection)
{
return ::TryEnterCriticalSection(winapi::detail::cast_ptr(lpCriticalSection));
}
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
BOOST_FORCEINLINE VOID_ DeleteCriticalSection(CRITICAL_SECTION_* lpCriticalSection)
{
::DeleteCriticalSection(winapi::detail::cast_ptr(lpCriticalSection));
}
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_CRITICAL_SECTION_HPP_INCLUDED_

View File

@@ -0,0 +1,191 @@
/*
* Copyright 2014 Antony Polukhin
* Copyright 2015 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_CRYPT_HPP_INCLUDED_
#define BOOST_WINAPI_CRYPT_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#if defined( BOOST_USE_WINDOWS_H )
// This header is not always included as part of windows.h
#include <wincrypt.h>
#endif
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
namespace boost { namespace winapi {
typedef ULONG_PTR_ HCRYPTPROV_;
}}
extern "C" {
#if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
CryptEnumProvidersA(
boost::winapi::DWORD_ dwIndex,
boost::winapi::DWORD_ *pdwReserved,
boost::winapi::DWORD_ dwFlags,
boost::winapi::DWORD_ *pdwProvType,
boost::winapi::LPSTR_ szProvName,
boost::winapi::DWORD_ *pcbProvName);
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
CryptAcquireContextA(
boost::winapi::HCRYPTPROV_ *phProv,
boost::winapi::LPCSTR_ pszContainer,
boost::winapi::LPCSTR_ pszProvider,
boost::winapi::DWORD_ dwProvType,
boost::winapi::DWORD_ dwFlags);
#endif // !defined( BOOST_NO_ANSI_APIS )
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
CryptEnumProvidersW(
boost::winapi::DWORD_ dwIndex,
boost::winapi::DWORD_ *pdwReserved,
boost::winapi::DWORD_ dwFlags,
boost::winapi::DWORD_ *pdwProvType,
boost::winapi::LPWSTR_ szProvName,
boost::winapi::DWORD_ *pcbProvName);
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
CryptAcquireContextW(
boost::winapi::HCRYPTPROV_ *phProv,
boost::winapi::LPCWSTR_ szContainer,
boost::winapi::LPCWSTR_ szProvider,
boost::winapi::DWORD_ dwProvType,
boost::winapi::DWORD_ dwFlags);
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
CryptGenRandom(
boost::winapi::HCRYPTPROV_ hProv,
boost::winapi::DWORD_ dwLen,
boost::winapi::BYTE_ *pbBuffer);
#endif // BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
#if defined(_MSC_VER) && (_MSC_VER+0) >= 1500 && (_MSC_VER+0) < 1900 && BOOST_USE_NTDDI_VERSION < BOOST_WINAPI_NTDDI_WINXP
// Standalone MS Windows SDK 6.0A and later until 10.0 provide a different declaration of CryptReleaseContext for Windows 2000 and older.
// This is not the case for (a) MinGW and MinGW-w64, (b) MSVC 7.1 and 8, which are shipped with their own Windows SDK,
// and (c) MSVC 14.0 and later, which are used with Windows SDK 10.
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
CryptReleaseContext(
boost::winapi::HCRYPTPROV_ hProv,
boost::winapi::ULONG_PTR_ dwFlags);
#else
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
CryptReleaseContext(
boost::winapi::HCRYPTPROV_ hProv,
boost::winapi::DWORD_ dwFlags);
#endif
#endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
}
#endif // !defined( BOOST_USE_WINDOWS_H )
namespace boost {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
typedef ::HCRYPTPROV HCRYPTPROV_;
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
BOOST_CONSTEXPR_OR_CONST DWORD_ PROV_RSA_FULL_ = PROV_RSA_FULL;
BOOST_CONSTEXPR_OR_CONST DWORD_ CRYPT_VERIFYCONTEXT_ = CRYPT_VERIFYCONTEXT;
BOOST_CONSTEXPR_OR_CONST DWORD_ CRYPT_NEWKEYSET_ = CRYPT_NEWKEYSET;
BOOST_CONSTEXPR_OR_CONST DWORD_ CRYPT_DELETEKEYSET_ = CRYPT_DELETEKEYSET;
BOOST_CONSTEXPR_OR_CONST DWORD_ CRYPT_MACHINE_KEYSET_ = CRYPT_MACHINE_KEYSET;
BOOST_CONSTEXPR_OR_CONST DWORD_ CRYPT_SILENT_ = CRYPT_SILENT;
#endif
#else
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
BOOST_CONSTEXPR_OR_CONST DWORD_ PROV_RSA_FULL_ = 1;
BOOST_CONSTEXPR_OR_CONST DWORD_ CRYPT_VERIFYCONTEXT_ = 0xF0000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ CRYPT_NEWKEYSET_ = 8;
BOOST_CONSTEXPR_OR_CONST DWORD_ CRYPT_DELETEKEYSET_ = 16;
BOOST_CONSTEXPR_OR_CONST DWORD_ CRYPT_MACHINE_KEYSET_ = 32;
BOOST_CONSTEXPR_OR_CONST DWORD_ CRYPT_SILENT_ = 64;
#endif
#endif
#if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
#if !defined( BOOST_NO_ANSI_APIS )
using ::CryptEnumProvidersA;
using ::CryptAcquireContextA;
#endif
using ::CryptEnumProvidersW;
using ::CryptAcquireContextW;
using ::CryptGenRandom;
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE BOOL_ crypt_enum_providers(
DWORD_ dwIndex,
DWORD_ *pdwReserved,
DWORD_ dwFlags,
DWORD_ *pdwProvType,
LPSTR_ szProvName,
DWORD_ *pcbProvName)
{
return ::CryptEnumProvidersA(dwIndex, pdwReserved, dwFlags, pdwProvType, szProvName, pcbProvName);
}
BOOST_FORCEINLINE BOOL_ crypt_acquire_context(
HCRYPTPROV_ *phProv,
LPCSTR_ pszContainer,
LPCSTR_ pszProvider,
DWORD_ dwProvType,
DWORD_ dwFlags)
{
return ::CryptAcquireContextA(phProv, pszContainer, pszProvider, dwProvType, dwFlags);
}
#endif
BOOST_FORCEINLINE BOOL_ crypt_enum_providers(
DWORD_ dwIndex,
DWORD_ *pdwReserved,
DWORD_ dwFlags,
DWORD_ *pdwProvType,
LPWSTR_ szProvName,
DWORD_ *pcbProvName)
{
return ::CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, szProvName, pcbProvName);
}
BOOST_FORCEINLINE BOOL_ crypt_acquire_context(
HCRYPTPROV_ *phProv,
LPCWSTR_ szContainer,
LPCWSTR_ szProvider,
DWORD_ dwProvType,
DWORD_ dwFlags)
{
return ::CryptAcquireContextW(phProv, szContainer, szProvider, dwProvType, dwFlags);
}
#endif // BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
BOOST_FORCEINLINE BOOL_ CryptReleaseContext(HCRYPTPROV_ hProv, DWORD_ dwFlags)
{
return ::CryptReleaseContext(hProv, dwFlags);
}
#endif
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_CRYPT_HPP_INCLUDED_

View File

@@ -0,0 +1,175 @@
/*
* Copyright 2015 Klemens Morgenstern
* Copyright 2016 Jorge Lodos
* Copyright 2016 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_DBGHELP_HPP_INCLUDED_
#define BOOST_WINAPI_DBGHELP_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#if defined( BOOST_USE_WINDOWS_H )
#if !defined( BOOST_WINAPI_IS_MINGW )
#include <dbghelp.h>
#else
// In MinGW there is no dbghelp.h but an older imagehlp.h header defines some of the symbols from it.
// Note that the user has to link with libimagehlp.a instead of libdbghelp.a for it to work.
#include <imagehlp.h>
#endif
#endif
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_WINAPI_PARTITION_DESKTOP
#include <boost/winapi/detail/header.hpp>
// Some symbols declared below are not present in all versions of Windows SDK, MinGW and MinGW-w64.
// dbghelp.h/imagehlp.h define the API_VERSION_NUMBER macro which we use to detect its version.
// When the macro is not available we can only guess based on the compiler version or SDK type.
#if defined(API_VERSION_NUMBER)
#if API_VERSION_NUMBER >= 11
// UnDecorateSymbolNameW available since Windows SDK 6.0A and MinGW-w64 (as of 2016-02-14)
#define BOOST_WINAPI_DETAIL_HAS_UNDECORATESYMBOLNAMEW
#endif
#elif defined(_MSC_VER) && _MSC_VER >= 1500
// Until MSVC 9.0 Windows SDK was bundled in Visual Studio and didn't have UnDecorateSymbolNameW.
// Supposedly, Windows SDK 6.0A was the first standalone one and it is used with MSVC 9.0.
#define BOOST_WINAPI_DETAIL_HAS_UNDECORATESYMBOLNAMEW
#elif !defined(BOOST_WINAPI_IS_MINGW)
// MinGW does not provide UnDecorateSymbolNameW (as of 2016-02-14)
#define BOOST_WINAPI_DETAIL_HAS_UNDECORATESYMBOLNAMEW
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
struct API_VERSION;
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
UnDecorateSymbolName(
boost::winapi::LPCSTR_ DecoratedName,
boost::winapi::LPSTR_ UnDecoratedName,
boost::winapi::DWORD_ UndecoratedLength,
boost::winapi::DWORD_ Flags);
#if defined( BOOST_WINAPI_DETAIL_HAS_UNDECORATESYMBOLNAMEW )
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
UnDecorateSymbolNameW(
boost::winapi::LPCWSTR_ DecoratedName,
boost::winapi::LPWSTR_ UnDecoratedName,
boost::winapi::DWORD_ UndecoratedLength,
boost::winapi::DWORD_ Flags);
#endif
BOOST_WINAPI_IMPORT API_VERSION* BOOST_WINAPI_WINAPI_CC
ImagehlpApiVersion(BOOST_WINAPI_DETAIL_VOID);
} // extern "C"
#endif
namespace boost {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_COMPLETE_ = UNDNAME_COMPLETE;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_LEADING_UNDERSCORES_ = UNDNAME_NO_LEADING_UNDERSCORES;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_MS_KEYWORDS_ = UNDNAME_NO_MS_KEYWORDS;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_FUNCTION_RETURNS_ = UNDNAME_NO_FUNCTION_RETURNS;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_ALLOCATION_MODEL_ = UNDNAME_NO_ALLOCATION_MODEL;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_ALLOCATION_LANGUAGE_ = UNDNAME_NO_ALLOCATION_LANGUAGE;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_MS_THISTYPE_ = UNDNAME_NO_MS_THISTYPE;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_CV_THISTYPE_ = UNDNAME_NO_CV_THISTYPE;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_THISTYPE_ = UNDNAME_NO_THISTYPE;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_ACCESS_SPECIFIERS_ = UNDNAME_NO_ACCESS_SPECIFIERS;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_THROW_SIGNATURES_ = UNDNAME_NO_THROW_SIGNATURES;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_MEMBER_TYPE_ = UNDNAME_NO_MEMBER_TYPE;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_RETURN_UDT_MODEL_ = UNDNAME_NO_RETURN_UDT_MODEL;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_32_BIT_DECODE_ = UNDNAME_32_BIT_DECODE;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NAME_ONLY_ = UNDNAME_NAME_ONLY;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_ARGUMENTS_ = UNDNAME_NO_ARGUMENTS;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_SPECIAL_SYMS_ = UNDNAME_NO_SPECIAL_SYMS;
#else // defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_COMPLETE_ = 0x00000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_LEADING_UNDERSCORES_ = 0x00000001;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_MS_KEYWORDS_ = 0x00000002;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_FUNCTION_RETURNS_ = 0x00000004;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_ALLOCATION_MODEL_ = 0x00000008;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_ALLOCATION_LANGUAGE_ = 0x00000010;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_MS_THISTYPE_ = 0x00000020;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_CV_THISTYPE_ = 0x00000040;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_THISTYPE_ = 0x00000060;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_ACCESS_SPECIFIERS_ = 0x00000080;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_THROW_SIGNATURES_ = 0x00000100;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_MEMBER_TYPE_ = 0x00000200;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_RETURN_UDT_MODEL_ = 0x00000400;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_32_BIT_DECODE_ = 0x00000800;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NAME_ONLY_ = 0x00001000;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_ARGUMENTS_ = 0x00002000;
BOOST_CONSTEXPR_OR_CONST DWORD_ UNDNAME_NO_SPECIAL_SYMS_ = 0x00004000;
#endif // defined( BOOST_USE_WINDOWS_H )
using ::UnDecorateSymbolName;
#if defined( BOOST_WINAPI_DETAIL_HAS_UNDECORATESYMBOLNAMEW )
using ::UnDecorateSymbolNameW;
#endif
typedef struct BOOST_MAY_ALIAS API_VERSION {
USHORT_ MajorVersion;
USHORT_ MinorVersion;
USHORT_ Revision;
USHORT_ Reserved;
} API_VERSION_, *LPAPI_VERSION_;
BOOST_FORCEINLINE LPAPI_VERSION_ ImagehlpApiVersion()
{
return reinterpret_cast<LPAPI_VERSION_>(::ImagehlpApiVersion());
}
BOOST_FORCEINLINE DWORD_ undecorate_symbol_name(
LPCSTR_ DecoratedName,
LPSTR_ UnDecoratedName,
DWORD_ UndecoratedLength,
DWORD_ Flags)
{
return ::UnDecorateSymbolName(
DecoratedName,
UnDecoratedName,
UndecoratedLength,
Flags);
}
#if defined( BOOST_WINAPI_DETAIL_HAS_UNDECORATESYMBOLNAMEW )
BOOST_FORCEINLINE DWORD_ undecorate_symbol_name(
LPCWSTR_ DecoratedName,
LPWSTR_ UnDecoratedName,
DWORD_ UndecoratedLength,
DWORD_ Flags)
{
return ::UnDecorateSymbolNameW(
DecoratedName,
UnDecoratedName,
UndecoratedLength,
Flags);
}
#endif
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_PARTITION_DESKTOP
#endif // BOOST_WINAPI_DBGHELP_HPP_INCLUDED_

View File

@@ -0,0 +1,61 @@
/*
* Copyright 2017 Vinnie Falco
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_DEBUGAPI_HPP_INCLUDED_
#define BOOST_WINAPI_DEBUGAPI_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/config.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if (BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4)
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
IsDebuggerPresent(BOOST_WINAPI_DETAIL_VOID);
#endif
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
OutputDebugStringA(boost::winapi::LPCSTR_);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::VOID_ BOOST_WINAPI_WINAPI_CC
OutputDebugStringW(boost::winapi::LPCWSTR_);
} // extern "C"
#endif
namespace boost {
namespace winapi {
#if (BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4)
using ::IsDebuggerPresent;
#endif
using ::OutputDebugStringA;
using ::OutputDebugStringW;
BOOST_FORCEINLINE void output_debug_string(char const* s)
{
::OutputDebugStringA(s);
}
BOOST_FORCEINLINE void output_debug_string(wchar_t const* s)
{
::OutputDebugStringW(s);
}
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_DEBUGAPI_HPP_INCLUDED_

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2015 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_DETAIL_CAST_PTR_HPP_INCLUDED_
#define BOOST_WINAPI_DETAIL_CAST_PTR_HPP_INCLUDED_
#include <boost/winapi/config.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
namespace boost {
namespace winapi {
namespace detail {
//! This class is used to automatically cast pointers to the type used in the current Windows SDK function declarations
class cast_ptr
{
private:
const void* m_p;
public:
explicit BOOST_FORCEINLINE cast_ptr(const void* p) BOOST_NOEXCEPT : m_p(p) {}
template< typename T >
BOOST_FORCEINLINE operator T* () const BOOST_NOEXCEPT { return (T*)m_p; }
};
}
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_DETAIL_CAST_PTR_HPP_INCLUDED_

View File

@@ -0,0 +1,21 @@
/*
* Copyright Andrey Semashev 2020.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
#if !defined(BOOST_WINAPI_ENABLE_WARNINGS)
#if defined(_MSC_VER) && !(defined(__INTEL_COMPILER) || defined(__clang__))
#pragma warning(pop)
#elif defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) \
&& (__GNUC__ * 100 + __GNUC_MINOR__) >= 406
#pragma GCC diagnostic pop
#endif
#endif // !defined(BOOST_WINAPI_ENABLE_WARNINGS)

View File

@@ -0,0 +1,27 @@
/*
* Copyright Andrey Semashev 2020.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
#if !defined(BOOST_WINAPI_ENABLE_WARNINGS)
#if defined(_MSC_VER) && !(defined(__INTEL_COMPILER) || defined(__clang__))
#pragma warning(push, 3)
// nonstandard extension used : nameless struct/union
#pragma warning(disable: 4201)
// Inconsistent annotation for 'X'
#pragma warning(disable: 28251)
#elif defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) \
&& (__GNUC__ * 100 + __GNUC_MINOR__) >= 406
#pragma GCC diagnostic push
// ISO C++ 1998 does not support 'long long'
#pragma GCC diagnostic ignored "-Wlong-long"
#endif
#endif // !defined(BOOST_WINAPI_ENABLE_WARNINGS)

View File

@@ -0,0 +1,106 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_DIRECTORY_MANAGEMENT_HPP_INCLUDED_
#define BOOST_WINAPI_DIRECTORY_MANAGEMENT_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/get_system_directory.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
CreateDirectoryA(boost::winapi::LPCSTR_, ::_SECURITY_ATTRIBUTES*);
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
GetTempPathA(boost::winapi::DWORD_ length, boost::winapi::LPSTR_ buffer);
#endif
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
RemoveDirectoryA(boost::winapi::LPCSTR_);
#endif
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
CreateDirectoryW(boost::winapi::LPCWSTR_, ::_SECURITY_ATTRIBUTES*);
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
GetTempPathW(boost::winapi::DWORD_ length, boost::winapi::LPWSTR_ buffer);
#endif
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
RemoveDirectoryW(boost::winapi::LPCWSTR_);
} // extern "C"
#endif
namespace boost {
namespace winapi {
#if !defined( BOOST_NO_ANSI_APIS )
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
using ::GetTempPathA;
#endif
using ::RemoveDirectoryA;
#endif
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
using ::GetTempPathW;
#endif
using ::RemoveDirectoryW;
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE BOOL_ CreateDirectoryA(LPCSTR_ pPathName, PSECURITY_ATTRIBUTES_ pSecurityAttributes)
{
return ::CreateDirectoryA(pPathName, reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(pSecurityAttributes));
}
#endif
BOOST_FORCEINLINE BOOL_ CreateDirectoryW(LPCWSTR_ pPathName, PSECURITY_ATTRIBUTES_ pSecurityAttributes)
{
return ::CreateDirectoryW(pPathName, reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(pSecurityAttributes));
}
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE BOOL_ create_directory(LPCSTR_ pPathName, PSECURITY_ATTRIBUTES_ pSecurityAttributes)
{
return ::CreateDirectoryA(pPathName, reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(pSecurityAttributes));
}
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
BOOST_FORCEINLINE DWORD_ get_temp_path(DWORD_ length, LPSTR_ buffer)
{
return ::GetTempPathA(length, buffer);
}
#endif
BOOST_FORCEINLINE BOOL_ remove_directory(LPCSTR_ pPathName)
{
return ::RemoveDirectoryA(pPathName);
}
#endif
BOOST_FORCEINLINE BOOL_ create_directory(LPCWSTR_ pPathName, PSECURITY_ATTRIBUTES_ pSecurityAttributes)
{
return ::CreateDirectoryW(pPathName, reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(pSecurityAttributes));
}
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
BOOST_FORCEINLINE DWORD_ get_temp_path(DWORD_ length, LPWSTR_ buffer)
{
return ::GetTempPathW(length, buffer);
}
#endif
BOOST_FORCEINLINE BOOL_ remove_directory(LPCWSTR_ pPathName)
{
return ::RemoveDirectoryW(pPathName);
}
} // namespace winapi
} // namespace boost
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_DIRECTORY_MANAGEMENT_HPP_INCLUDED_

View File

@@ -0,0 +1,199 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2014 Renato Tegon Forti, Antony Polukhin
* Copyright 2015, 2020 Andrey Semashev
* Copyright 2015 Antony Polukhin
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_DLL_HPP_INCLUDED_
#define BOOST_WINAPI_DLL_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/get_proc_address.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_WINAPI_IMPORT boost::winapi::HMODULE_ BOOST_WINAPI_WINAPI_CC
LoadLibraryA(boost::winapi::LPCSTR_ lpFileName);
BOOST_WINAPI_IMPORT boost::winapi::HMODULE_ BOOST_WINAPI_WINAPI_CC
LoadLibraryExA(
boost::winapi::LPCSTR_ lpFileName,
boost::winapi::HANDLE_ hFile,
boost::winapi::DWORD_ dwFlags
);
BOOST_WINAPI_IMPORT boost::winapi::HMODULE_ BOOST_WINAPI_WINAPI_CC
GetModuleHandleA(boost::winapi::LPCSTR_ lpFileName);
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
GetModuleFileNameA(
boost::winapi::HMODULE_ hModule,
boost::winapi::LPSTR_ lpFilename,
boost::winapi::DWORD_ nSize
);
#endif
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::HMODULE_ BOOST_WINAPI_WINAPI_CC
LoadLibraryW(boost::winapi::LPCWSTR_ lpFileName);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::HMODULE_ BOOST_WINAPI_WINAPI_CC
LoadLibraryExW(
boost::winapi::LPCWSTR_ lpFileName,
boost::winapi::HANDLE_ hFile,
boost::winapi::DWORD_ dwFlags
);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::HMODULE_ BOOST_WINAPI_WINAPI_CC
GetModuleHandleW(boost::winapi::LPCWSTR_ lpFileName);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
GetModuleFileNameW(
boost::winapi::HMODULE_ hModule,
boost::winapi::LPWSTR_ lpFilename,
boost::winapi::DWORD_ nSize
);
struct _MEMORY_BASIC_INFORMATION;
#if !defined( BOOST_WINAPI_IS_MINGW )
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::SIZE_T_ BOOST_WINAPI_WINAPI_CC
VirtualQuery(
boost::winapi::LPCVOID_ lpAddress,
::_MEMORY_BASIC_INFORMATION* lpBuffer,
boost::winapi::SIZE_T_ dwLength
);
#else // !defined( BOOST_WINAPI_IS_MINGW )
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
VirtualQuery(
boost::winapi::LPCVOID_ lpAddress,
::_MEMORY_BASIC_INFORMATION* lpBuffer,
boost::winapi::DWORD_ dwLength
);
#endif // !defined( BOOST_WINAPI_IS_MINGW )
} // extern "C"
#endif // #if !defined( BOOST_USE_WINDOWS_H )
namespace boost {
namespace winapi {
typedef struct BOOST_MAY_ALIAS MEMORY_BASIC_INFORMATION_ {
PVOID_ BaseAddress;
PVOID_ AllocationBase;
DWORD_ AllocationProtect;
SIZE_T_ RegionSize;
DWORD_ State;
DWORD_ Protect;
DWORD_ Type;
} *PMEMORY_BASIC_INFORMATION_;
#if defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST DWORD_ DONT_RESOLVE_DLL_REFERENCES_ = DONT_RESOLVE_DLL_REFERENCES;
BOOST_CONSTEXPR_OR_CONST DWORD_ LOAD_WITH_ALTERED_SEARCH_PATH_ = LOAD_WITH_ALTERED_SEARCH_PATH;
#else // defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST DWORD_ DONT_RESOLVE_DLL_REFERENCES_ = 0x00000001;
BOOST_CONSTEXPR_OR_CONST DWORD_ LOAD_WITH_ALTERED_SEARCH_PATH_ = 0x00000008;
#endif // defined( BOOST_USE_WINDOWS_H )
// This one is not defined by MinGW
BOOST_CONSTEXPR_OR_CONST DWORD_ LOAD_IGNORE_CODE_AUTHZ_LEVEL_ = 0x00000010;
#if !defined( BOOST_NO_ANSI_APIS )
using ::LoadLibraryA;
using ::LoadLibraryExA;
using ::GetModuleHandleA;
using ::GetModuleFileNameA;
#endif // !defined( BOOST_NO_ANSI_APIS )
using ::LoadLibraryW;
using ::LoadLibraryExW;
using ::GetModuleHandleW;
using ::GetModuleFileNameW;
BOOST_FORCEINLINE SIZE_T_ VirtualQuery(LPCVOID_ lpAddress, MEMORY_BASIC_INFORMATION_* lpBuffer, SIZE_T_ dwLength)
{
return ::VirtualQuery(lpAddress, reinterpret_cast< ::_MEMORY_BASIC_INFORMATION* >(lpBuffer), dwLength);
}
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HMODULE_ load_library(LPCSTR_ lpFileName)
{
return ::LoadLibraryA(lpFileName);
}
BOOST_FORCEINLINE HMODULE_ load_library_ex(LPCSTR_ lpFileName, HANDLE_ hFile, DWORD_ dwFlags)
{
return ::LoadLibraryExA(lpFileName, hFile, dwFlags);
}
BOOST_FORCEINLINE HMODULE_ get_module_handle(LPCSTR_ lpFileName)
{
return ::GetModuleHandleA(lpFileName);
}
BOOST_FORCEINLINE DWORD_ get_module_file_name(HMODULE_ hModule, LPSTR_ lpFilename, DWORD_ nSize)
{
return ::GetModuleFileNameA(hModule, lpFilename, nSize);
}
#endif // #if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HMODULE_ load_library(LPCWSTR_ lpFileName)
{
return ::LoadLibraryW(lpFileName);
}
BOOST_FORCEINLINE HMODULE_ load_library_ex(LPCWSTR_ lpFileName, HANDLE_ hFile, DWORD_ dwFlags)
{
return ::LoadLibraryExW(lpFileName, hFile, dwFlags);
}
BOOST_FORCEINLINE HMODULE_ get_module_handle(LPCWSTR_ lpFileName)
{
return ::GetModuleHandleW(lpFileName);
}
BOOST_FORCEINLINE DWORD_ get_module_file_name(HMODULE_ hModule, LPWSTR_ lpFilename, DWORD_ nSize)
{
return ::GetModuleFileNameW(hModule, lpFilename, nSize);
}
} // namespace winapi
} // namespace boost
#endif // BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
//
// FreeLibrary is in a different partition set (slightly)
//
#if BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM
#if !defined(BOOST_USE_WINDOWS_H)
extern "C" {
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
FreeLibrary(boost::winapi::HMODULE_ hModule);
}
#endif
namespace boost {
namespace winapi {
using ::FreeLibrary;
}
}
#endif // BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_DLL_HPP_INCLUDED_

View File

@@ -0,0 +1,146 @@
/*
* Copyright 2016 Klemens D. Morgenstern
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_ENVIRONMENT_HPP_INCLUDED_
#define BOOST_WINAPI_ENVIRONMENT_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
#include <boost/winapi/detail/header.hpp>
#if defined(GetEnvironmentStrings)
// Unlike most of the WinAPI, GetEnvironmentStrings is a real function and GetEnvironmentStringsA is a macro.
// In UNICODE builds, GetEnvironmentStrings is also defined as a macro that redirects to GetEnvironmentStringsW,
// and the narrow character version become inaccessible. Facepalm.
#if defined(_MSC_VER) || defined(__GNUC__)
#pragma push_macro("GetEnvironmentStrings")
#endif
#undef GetEnvironmentStrings
#define BOOST_WINAPI_DETAIL_GET_ENVIRONMENT_STRINGS_UNDEFINED
#endif // defined(GetEnvironmentStrings)
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_WINAPI_IMPORT boost::winapi::LPSTR_ BOOST_WINAPI_WINAPI_CC GetEnvironmentStrings();
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC FreeEnvironmentStringsA(boost::winapi::LPSTR_);
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC GetEnvironmentVariableA(
boost::winapi::LPCSTR_ lpName,
boost::winapi::LPSTR_ lpBuffer,
boost::winapi::DWORD_ nSize
);
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC SetEnvironmentVariableA(
boost::winapi::LPCSTR_ lpName,
boost::winapi::LPCSTR_ lpValue
);
#endif // !defined( BOOST_NO_ANSI_APIS )
BOOST_WINAPI_IMPORT boost::winapi::LPWSTR_ BOOST_WINAPI_WINAPI_CC GetEnvironmentStringsW();
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC FreeEnvironmentStringsW(boost::winapi::LPWSTR_);
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC GetEnvironmentVariableW(
boost::winapi::LPCWSTR_ lpName,
boost::winapi::LPWSTR_ lpBuffer,
boost::winapi::DWORD_ nSize
);
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC SetEnvironmentVariableW(
boost::winapi::LPCWSTR_ lpName,
boost::winapi::LPCWSTR_ lpValue
);
} // extern "C"
#endif // !defined( BOOST_USE_WINDOWS_H )
namespace boost {
namespace winapi {
#if !defined( BOOST_NO_ANSI_APIS )
using ::GetEnvironmentStrings;
using ::FreeEnvironmentStringsA;
using ::GetEnvironmentVariableA;
using ::SetEnvironmentVariableA;
#endif // !defined( BOOST_NO_ANSI_APIS )
using ::GetEnvironmentStringsW;
using ::FreeEnvironmentStringsW;
using ::GetEnvironmentVariableW;
using ::SetEnvironmentVariableW;
template< typename Char >
Char* get_environment_strings();
#if !defined( BOOST_NO_ANSI_APIS )
template< >
BOOST_FORCEINLINE char* get_environment_strings< char >()
{
return GetEnvironmentStrings();
}
BOOST_FORCEINLINE BOOL_ free_environment_strings(LPSTR_ p)
{
return FreeEnvironmentStringsA(p);
}
BOOST_FORCEINLINE DWORD_ get_environment_variable(LPCSTR_ name, LPSTR_ buffer, DWORD_ size)
{
return GetEnvironmentVariableA(name, buffer, size);
}
BOOST_FORCEINLINE BOOL_ set_environment_variable(LPCSTR_ name, LPCSTR_ value)
{
return SetEnvironmentVariableA(name, value);
}
#endif // !defined( BOOST_NO_ANSI_APIS )
template< >
BOOST_FORCEINLINE wchar_t* get_environment_strings< wchar_t >()
{
return GetEnvironmentStringsW();
}
BOOST_FORCEINLINE BOOL_ free_environment_strings(LPWSTR_ p)
{
return FreeEnvironmentStringsW(p);
}
BOOST_FORCEINLINE DWORD_ get_environment_variable(LPCWSTR_ name, LPWSTR_ buffer, DWORD_ size)
{
return GetEnvironmentVariableW(name, buffer, size);
}
BOOST_FORCEINLINE BOOL_ set_environment_variable(LPCWSTR_ name, LPCWSTR_ value)
{
return SetEnvironmentVariableW(name, value);
}
} // namespace winapi
} // namespace boost
#if defined(BOOST_WINAPI_DETAIL_GET_ENVIRONMENT_STRINGS_UNDEFINED)
#if defined(_MSC_VER) || defined(__GNUC__)
#pragma pop_macro("GetEnvironmentStrings")
#elif defined(UNICODE)
#define GetEnvironmentStrings GetEnvironmentStringsW
#endif
#undef BOOST_WINAPI_DETAIL_GET_ENVIRONMENT_STRINGS_UNDEFINED
#endif // defined(BOOST_WINAPI_DETAIL_GET_ENVIRONMENT_STRINGS_UNDEFINED)
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
#endif // BOOST_WINAPI_ENVIRONMENT_HPP_INCLUDED_

View File

@@ -0,0 +1,156 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015 Andrey Semashev
* Copyright 2016 Jorge Lodos
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_ERROR_HANDLING_HPP_INCLUDED_
#define BOOST_WINAPI_ERROR_HANDLING_HPP_INCLUDED_
#include <stdarg.h>
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/get_last_error.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
FormatMessageA(
boost::winapi::DWORD_ dwFlags,
boost::winapi::LPCVOID_ lpSource,
boost::winapi::DWORD_ dwMessageId,
boost::winapi::DWORD_ dwLanguageId,
boost::winapi::LPSTR_ lpBuffer,
boost::winapi::DWORD_ nSize,
va_list *Arguments);
#endif
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
FormatMessageW(
boost::winapi::DWORD_ dwFlags,
boost::winapi::LPCVOID_ lpSource,
boost::winapi::DWORD_ dwMessageId,
boost::winapi::DWORD_ dwLanguageId,
boost::winapi::LPWSTR_ lpBuffer,
boost::winapi::DWORD_ nSize,
va_list *Arguments);
#if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
BOOST_WINAPI_IMPORT boost::winapi::UINT_ BOOST_WINAPI_WINAPI_CC
SetErrorMode(boost::winapi::UINT_ uMode);
#endif
} // extern "C"
#endif
namespace boost {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
BOOST_CONSTEXPR_OR_CONST DWORD_ FORMAT_MESSAGE_ALLOCATE_BUFFER_= FORMAT_MESSAGE_ALLOCATE_BUFFER;
#endif
BOOST_CONSTEXPR_OR_CONST DWORD_ FORMAT_MESSAGE_IGNORE_INSERTS_= FORMAT_MESSAGE_IGNORE_INSERTS;
BOOST_CONSTEXPR_OR_CONST DWORD_ FORMAT_MESSAGE_FROM_STRING_= FORMAT_MESSAGE_FROM_STRING;
BOOST_CONSTEXPR_OR_CONST DWORD_ FORMAT_MESSAGE_FROM_HMODULE_= FORMAT_MESSAGE_FROM_HMODULE;
BOOST_CONSTEXPR_OR_CONST DWORD_ FORMAT_MESSAGE_FROM_SYSTEM_= FORMAT_MESSAGE_FROM_SYSTEM;
BOOST_CONSTEXPR_OR_CONST DWORD_ FORMAT_MESSAGE_ARGUMENT_ARRAY_= FORMAT_MESSAGE_ARGUMENT_ARRAY;
BOOST_CONSTEXPR_OR_CONST DWORD_ FORMAT_MESSAGE_MAX_WIDTH_MASK_= FORMAT_MESSAGE_MAX_WIDTH_MASK;
BOOST_CONSTEXPR_OR_CONST WORD_ LANG_NEUTRAL_= LANG_NEUTRAL;
BOOST_CONSTEXPR_OR_CONST WORD_ LANG_INVARIANT_= LANG_INVARIANT;
BOOST_CONSTEXPR_OR_CONST WORD_ SUBLANG_DEFAULT_= SUBLANG_DEFAULT; // user default
BOOST_FORCEINLINE BOOST_CONSTEXPR WORD_ MAKELANGID_(WORD_ p, WORD_ s) BOOST_NOEXCEPT
{
return static_cast< WORD_ >(MAKELANGID(p, s));
}
#if BOOST_WINAPI_PARTITION_DESKTOP
BOOST_CONSTEXPR_OR_CONST DWORD_ SEM_FAILCRITICALERRORS_ = SEM_FAILCRITICALERRORS;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEM_NOGPFAULTERRORBOX_ = SEM_NOGPFAULTERRORBOX;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEM_NOALIGNMENTFAULTEXCEPT_ = SEM_NOALIGNMENTFAULTEXCEPT;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEM_NOOPENFILEERRORBOX_ = SEM_NOOPENFILEERRORBOX;
#endif
#else
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
BOOST_CONSTEXPR_OR_CONST DWORD_ FORMAT_MESSAGE_ALLOCATE_BUFFER_= 0x00000100;
#endif
BOOST_CONSTEXPR_OR_CONST DWORD_ FORMAT_MESSAGE_IGNORE_INSERTS_= 0x00000200;
BOOST_CONSTEXPR_OR_CONST DWORD_ FORMAT_MESSAGE_FROM_STRING_= 0x00000400;
BOOST_CONSTEXPR_OR_CONST DWORD_ FORMAT_MESSAGE_FROM_HMODULE_= 0x00000800;
BOOST_CONSTEXPR_OR_CONST DWORD_ FORMAT_MESSAGE_FROM_SYSTEM_= 0x00001000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FORMAT_MESSAGE_ARGUMENT_ARRAY_= 0x00002000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FORMAT_MESSAGE_MAX_WIDTH_MASK_= 0x000000FF;
BOOST_CONSTEXPR_OR_CONST WORD_ LANG_NEUTRAL_= 0x00;
BOOST_CONSTEXPR_OR_CONST WORD_ LANG_INVARIANT_= 0x7f;
BOOST_CONSTEXPR_OR_CONST WORD_ SUBLANG_DEFAULT_= 0x01; // user default
BOOST_FORCEINLINE BOOST_CONSTEXPR WORD_ MAKELANGID_(WORD_ p, WORD_ s) BOOST_NOEXCEPT
{
return static_cast< WORD_ >((static_cast< DWORD_ >(s) << 10u) | p);
}
#if BOOST_WINAPI_PARTITION_DESKTOP
BOOST_CONSTEXPR_OR_CONST DWORD_ SEM_FAILCRITICALERRORS_ = 0x0001;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEM_NOGPFAULTERRORBOX_ = 0x0002;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEM_NOALIGNMENTFAULTEXCEPT_ = 0x0004;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEM_NOOPENFILEERRORBOX_ = 0x8000;
#endif
#endif
#if !defined( BOOST_NO_ANSI_APIS )
using ::FormatMessageA;
#endif
using ::FormatMessageW;
#if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
using ::SetErrorMode;
#endif
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE DWORD_ format_message(
DWORD_ dwFlags,
LPCVOID_ lpSource,
DWORD_ dwMessageId,
DWORD_ dwLanguageId,
LPSTR_ lpBuffer,
DWORD_ nSize,
va_list *Arguments)
{
return ::FormatMessageA(dwFlags, lpSource, dwMessageId, dwLanguageId, lpBuffer, nSize, Arguments);
}
#endif
BOOST_FORCEINLINE DWORD_ format_message(
DWORD_ dwFlags,
LPCVOID_ lpSource,
DWORD_ dwMessageId,
DWORD_ dwLanguageId,
LPWSTR_ lpBuffer,
DWORD_ nSize,
va_list *Arguments)
{
return ::FormatMessageW(dwFlags, lpSource, dwMessageId, dwLanguageId, lpBuffer, nSize, Arguments);
}
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_ERROR_HANDLING_HPP_INCLUDED_

View File

@@ -0,0 +1,193 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015, 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_EVENT_HPP_INCLUDED_
#define BOOST_WINAPI_EVENT_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H ) && BOOST_WINAPI_PARTITION_APP_SYSTEM
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_WINAPI_IMPORT boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
CreateEventA(
::_SECURITY_ATTRIBUTES* lpEventAttributes,
boost::winapi::BOOL_ bManualReset,
boost::winapi::BOOL_ bInitialState,
boost::winapi::LPCSTR_ lpName);
#endif
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
CreateEventW(
::_SECURITY_ATTRIBUTES* lpEventAttributes,
boost::winapi::BOOL_ bManualReset,
boost::winapi::BOOL_ bInitialState,
boost::winapi::LPCWSTR_ lpName);
} // extern "C"
#endif // !defined( BOOST_USE_WINDOWS_H ) && BOOST_WINAPI_PARTITION_APP_SYSTEM
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_WINAPI_IMPORT boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
CreateEventExA(
::_SECURITY_ATTRIBUTES *lpEventAttributes,
boost::winapi::LPCSTR_ lpName,
boost::winapi::DWORD_ dwFlags,
boost::winapi::DWORD_ dwDesiredAccess);
#endif
BOOST_WINAPI_IMPORT boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
OpenEventA(
boost::winapi::DWORD_ dwDesiredAccess,
boost::winapi::BOOL_ bInheritHandle,
boost::winapi::LPCSTR_ lpName);
#endif // !defined( BOOST_NO_ANSI_APIS )
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_WINAPI_IMPORT boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
CreateEventExW(
::_SECURITY_ATTRIBUTES *lpEventAttributes,
boost::winapi::LPCWSTR_ lpName,
boost::winapi::DWORD_ dwFlags,
boost::winapi::DWORD_ dwDesiredAccess);
#endif
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
OpenEventW(
boost::winapi::DWORD_ dwDesiredAccess,
boost::winapi::BOOL_ bInheritHandle,
boost::winapi::LPCWSTR_ lpName);
// Windows CE define SetEvent/ResetEvent as inline functions in kfuncs.h
#if !defined( UNDER_CE )
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
SetEvent(boost::winapi::HANDLE_ hEvent);
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
ResetEvent(boost::winapi::HANDLE_ hEvent);
#endif
} // extern "C"
#endif
namespace boost {
namespace winapi {
#if !defined( BOOST_NO_ANSI_APIS )
using ::OpenEventA;
#endif
using ::OpenEventW;
using ::SetEvent;
using ::ResetEvent;
#if defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST DWORD_ EVENT_ALL_ACCESS_ = EVENT_ALL_ACCESS;
BOOST_CONSTEXPR_OR_CONST DWORD_ EVENT_MODIFY_STATE_ = EVENT_MODIFY_STATE;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_CONSTEXPR_OR_CONST DWORD_ CREATE_EVENT_INITIAL_SET_ = CREATE_EVENT_INITIAL_SET;
BOOST_CONSTEXPR_OR_CONST DWORD_ CREATE_EVENT_MANUAL_RESET_ = CREATE_EVENT_MANUAL_RESET;
#endif
#else // defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST DWORD_ EVENT_ALL_ACCESS_ = 0x001F0003;
BOOST_CONSTEXPR_OR_CONST DWORD_ EVENT_MODIFY_STATE_ = 0x00000002;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_CONSTEXPR_OR_CONST DWORD_ CREATE_EVENT_INITIAL_SET_ = 0x00000002;
BOOST_CONSTEXPR_OR_CONST DWORD_ CREATE_EVENT_MANUAL_RESET_ = 0x00000001;
#endif
#endif // defined( BOOST_USE_WINDOWS_H )
// Undocumented and not present in Windows SDK. Enables NtQueryEvent.
// http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FNT%20Objects%2FEvent%2FNtQueryEvent.html
BOOST_CONSTEXPR_OR_CONST DWORD_ EVENT_QUERY_STATE_ = 0x00000001;
BOOST_CONSTEXPR_OR_CONST DWORD_ event_all_access = EVENT_ALL_ACCESS_;
BOOST_CONSTEXPR_OR_CONST DWORD_ event_modify_state = EVENT_MODIFY_STATE_;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_CONSTEXPR_OR_CONST DWORD_ create_event_initial_set = CREATE_EVENT_INITIAL_SET_;
BOOST_CONSTEXPR_OR_CONST DWORD_ create_event_manual_reset = CREATE_EVENT_MANUAL_RESET_;
#endif
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ CreateEventA(SECURITY_ATTRIBUTES_* lpEventAttributes, BOOL_ bManualReset, BOOL_ bInitialState, LPCSTR_ lpName)
{
#if !BOOST_WINAPI_PARTITION_APP_SYSTEM && BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
const DWORD_ flags = (bManualReset ? create_event_manual_reset : 0u) | (bInitialState ? create_event_initial_set : 0u);
return ::CreateEventExA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpEventAttributes), lpName, flags, event_all_access);
#else
return ::CreateEventA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpEventAttributes), bManualReset, bInitialState, lpName);
#endif
}
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_FORCEINLINE HANDLE_ CreateEventExA(SECURITY_ATTRIBUTES_* lpEventAttributes, LPCSTR_ lpName, DWORD_ dwFlags, DWORD_ dwDesiredAccess)
{
return ::CreateEventExA(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpEventAttributes), lpName, dwFlags, dwDesiredAccess);
}
#endif
#endif
BOOST_FORCEINLINE HANDLE_ CreateEventW(SECURITY_ATTRIBUTES_* lpEventAttributes, BOOL_ bManualReset, BOOL_ bInitialState, LPCWSTR_ lpName)
{
#if !BOOST_WINAPI_PARTITION_APP_SYSTEM && BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
const DWORD_ flags = (bManualReset ? create_event_manual_reset : 0u) | (bInitialState ? create_event_initial_set : 0u);
return ::CreateEventExW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpEventAttributes), lpName, flags, event_all_access);
#else
return ::CreateEventW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpEventAttributes), bManualReset, bInitialState, lpName);
#endif
}
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
BOOST_FORCEINLINE HANDLE_ CreateEventExW(SECURITY_ATTRIBUTES_* lpEventAttributes, LPCWSTR_ lpName, DWORD_ dwFlags, DWORD_ dwDesiredAccess)
{
return ::CreateEventExW(reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpEventAttributes), lpName, dwFlags, dwDesiredAccess);
}
#endif
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ create_event(SECURITY_ATTRIBUTES_* lpEventAttributes, BOOL_ bManualReset, BOOL_ bInitialState, LPCSTR_ lpName)
{
return winapi::CreateEventA(lpEventAttributes, bManualReset, bInitialState, lpName);
}
BOOST_FORCEINLINE HANDLE_ open_event(DWORD_ dwDesiredAccess, BOOL_ bInheritHandle, LPCSTR_ lpName)
{
return ::OpenEventA(dwDesiredAccess, bInheritHandle, lpName);
}
#endif
BOOST_FORCEINLINE HANDLE_ create_event(SECURITY_ATTRIBUTES_* lpEventAttributes, BOOL_ bManualReset, BOOL_ bInitialState, LPCWSTR_ lpName)
{
return winapi::CreateEventW(lpEventAttributes, bManualReset, bInitialState, lpName);
}
BOOST_FORCEINLINE HANDLE_ open_event(DWORD_ dwDesiredAccess, BOOL_ bInheritHandle, LPCWSTR_ lpName)
{
return ::OpenEventW(dwDesiredAccess, bInheritHandle, lpName);
}
BOOST_FORCEINLINE HANDLE_ create_anonymous_event(SECURITY_ATTRIBUTES_* lpEventAttributes, BOOL_ bManualReset, BOOL_ bInitialState)
{
return winapi::CreateEventW(lpEventAttributes, bManualReset, bInitialState, 0);
}
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_EVENT_HPP_INCLUDED_

View File

@@ -0,0 +1,597 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015 Andrey Semashev
* Copyright 2016 Jorge Lodos
* Copyright 2017 James E. King, III
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_FILE_MANAGEMENT_HPP_INCLUDED_
#define BOOST_WINAPI_FILE_MANAGEMENT_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/limits.hpp>
#include <boost/winapi/time.hpp>
#include <boost/winapi/overlapped.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
/*
* UWP:
* API SDK 8 SDK 10 _WIN32_WINNT
* AreFileApisANSI DESKTOP - DESKTOP | SYSTEM
* CreateFile DESKTOP - DESKTOP | SYSTEM
* DeleteFile APP - APP | SYSTEM
* FindClose APP - APP | SYSTEM
* FindFirstFile DESKTOP > APP | SYSTEM
* FindNextFile DESKTOP > APP | SYSTEM
* GetFileAttributes DESKTOP > APP | SYSTEM
* GetFileInformationByHandle DESKTOP - DESKTOP | SYSTEM
* GetFileSizeEx DESKTOP > APP | SYSTEM
* LockFile DESKTOP - DESKTOP | SYSTEM
* MoveFileEx APP - APP | SYSTEM
* ReadFile APP - APP | SYSTEM
* SetEndOfFile APP - APP | SYSTEM
* SetFilePointer DESKTOP > APP | SYSTEM
* SetFileValidData DESKTOP - DESKTOP | SYSTEM >= 0x0501
* UnlockFile DESKTOP - DESKTOP | SYSTEM
* WriteFile APP - APP | SYSTEM
*/
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
AreFileApisANSI(BOOST_WINAPI_DETAIL_VOID);
BOOST_WINAPI_IMPORT boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
CreateFileA(
boost::winapi::LPCSTR_ lpFileName,
boost::winapi::DWORD_ dwDesiredAccess,
boost::winapi::DWORD_ dwShareMode,
::_SECURITY_ATTRIBUTES* lpSecurityAttributes,
boost::winapi::DWORD_ dwCreationDisposition,
boost::winapi::DWORD_ dwFlagsAndAttributes,
boost::winapi::HANDLE_ hTemplateFile);
struct _WIN32_FIND_DATAA;
BOOST_WINAPI_IMPORT boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
FindFirstFileA(boost::winapi::LPCSTR_ lpFileName, ::_WIN32_FIND_DATAA* lpFindFileData);
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
FindNextFileA(boost::winapi::HANDLE_ hFindFile, ::_WIN32_FIND_DATAA* lpFindFileData);
#endif
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
CreateFileW(
boost::winapi::LPCWSTR_ lpFileName,
boost::winapi::DWORD_ dwDesiredAccess,
boost::winapi::DWORD_ dwShareMode,
::_SECURITY_ATTRIBUTES* lpSecurityAttributes,
boost::winapi::DWORD_ dwCreationDisposition,
boost::winapi::DWORD_ dwFlagsAndAttributes,
boost::winapi::HANDLE_ hTemplateFile);
struct _WIN32_FIND_DATAW;
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
FindFirstFileW(boost::winapi::LPCWSTR_ lpFileName, ::_WIN32_FIND_DATAW* lpFindFileData);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
FindNextFileW(boost::winapi::HANDLE_ hFindFile, ::_WIN32_FIND_DATAW* lpFindFileData);
struct _BY_HANDLE_FILE_INFORMATION;
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
GetFileInformationByHandle(
boost::winapi::HANDLE_ hFile,
::_BY_HANDLE_FILE_INFORMATION* lpFileInformation);
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
LockFile(
boost::winapi::HANDLE_ hFile,
boost::winapi::DWORD_ dwFileOffsetLow,
boost::winapi::DWORD_ dwFileOffsetHigh,
boost::winapi::DWORD_ nNumberOfBytesToLockLow,
boost::winapi::DWORD_ nNumberOfBytesToLockHigh);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
LockFileEx(
boost::winapi::HANDLE_ hFile,
boost::winapi::DWORD_ dwFlags,
boost::winapi::DWORD_ dwReserved,
boost::winapi::DWORD_ nNumberOfBytesToLockLow,
boost::winapi::DWORD_ nNumberOfBytesToLockHigh,
::_OVERLAPPED* lpOverlapped);
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
SetFileValidData(
boost::winapi::HANDLE_ hFile,
boost::winapi::LONGLONG_ ValidDataLength);
#endif
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
UnlockFile(
boost::winapi::HANDLE_ hFile,
boost::winapi::DWORD_ dwFileOffsetLow,
boost::winapi::DWORD_ dwFileOffsetHigh,
boost::winapi::DWORD_ nNumberOfBytesToUnlockLow,
boost::winapi::DWORD_ nNumberOfBytesToUnlockHigh);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
UnlockFileEx(
boost::winapi::HANDLE_ hFile,
boost::winapi::DWORD_ dwReserved,
boost::winapi::DWORD_ nNumberOfBytesToUnlockLow,
boost::winapi::DWORD_ nNumberOfBytesToUnlockHigh,
::_OVERLAPPED* lpOverlapped);
#endif
#if BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
DeleteFileA(boost::winapi::LPCSTR_ lpFileName);
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
MoveFileExA(
boost::winapi::LPCSTR_ lpExistingFileName,
boost::winapi::LPCSTR_ lpNewFileName,
boost::winapi::DWORD_ dwFlags);
#endif
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
DeleteFileW(boost::winapi::LPCWSTR_ lpFileName);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
FindClose(boost::winapi::HANDLE_ hFindFile);
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
MoveFileExW(
boost::winapi::LPCWSTR_ lpExistingFileName,
boost::winapi::LPCWSTR_ lpNewFileName,
boost::winapi::DWORD_ dwFlags);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
ReadFile(
boost::winapi::HANDLE_ hFile,
boost::winapi::LPVOID_ lpBuffer,
boost::winapi::DWORD_ nNumberOfBytesToRead,
boost::winapi::LPDWORD_ lpNumberOfBytesRead,
::_OVERLAPPED* lpOverlapped);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
SetEndOfFile(boost::winapi::HANDLE_ hFile);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
WriteFile(
boost::winapi::HANDLE_ hFile,
boost::winapi::LPCVOID_ lpBuffer,
boost::winapi::DWORD_ nNumberOfBytesToWrite,
boost::winapi::LPDWORD_ lpNumberOfBytesWritten,
::_OVERLAPPED* lpOverlapped);
#endif // BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
GetFileAttributesA(boost::winapi::LPCSTR_ lpFileName);
#endif
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
GetFileAttributesW(boost::winapi::LPCWSTR_ lpFileName);
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
GetFileSizeEx(boost::winapi::HANDLE_ hFile, ::_LARGE_INTEGER* lpFileSize);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
SetFilePointer(
boost::winapi::HANDLE_ hFile,
boost::winapi::LONG_ lpDistanceToMove,
boost::winapi::PLONG_ lpDistanceToMoveHigh,
boost::winapi::DWORD_ dwMoveMethod);
#endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
} // extern "C"
#endif // !defined(BOOST_USE_WINDOWS_H)
namespace boost {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST DWORD_ INVALID_FILE_SIZE_ = INVALID_FILE_SIZE;
BOOST_CONSTEXPR_OR_CONST DWORD_ INVALID_SET_FILE_POINTER_ = INVALID_SET_FILE_POINTER;
BOOST_CONSTEXPR_OR_CONST DWORD_ INVALID_FILE_ATTRIBUTES_ = INVALID_FILE_ATTRIBUTES;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_READONLY_ = FILE_ATTRIBUTE_READONLY;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_HIDDEN_ = FILE_ATTRIBUTE_HIDDEN;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_SYSTEM_ = FILE_ATTRIBUTE_SYSTEM;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_DIRECTORY_ = FILE_ATTRIBUTE_DIRECTORY;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_ARCHIVE_ = FILE_ATTRIBUTE_ARCHIVE;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_DEVICE_ = FILE_ATTRIBUTE_DEVICE;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_NORMAL_ = FILE_ATTRIBUTE_NORMAL;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_TEMPORARY_ = FILE_ATTRIBUTE_TEMPORARY;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_SPARSE_FILE_ = FILE_ATTRIBUTE_SPARSE_FILE;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_REPARSE_POINT_ = FILE_ATTRIBUTE_REPARSE_POINT;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_COMPRESSED_ = FILE_ATTRIBUTE_COMPRESSED;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_OFFLINE_ = FILE_ATTRIBUTE_OFFLINE;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_NOT_CONTENT_INDEXED_ = FILE_ATTRIBUTE_NOT_CONTENT_INDEXED;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_ENCRYPTED_ = FILE_ATTRIBUTE_ENCRYPTED;
BOOST_CONSTEXPR_OR_CONST DWORD_ CREATE_NEW_ = CREATE_NEW;
BOOST_CONSTEXPR_OR_CONST DWORD_ CREATE_ALWAYS_ = CREATE_ALWAYS;
BOOST_CONSTEXPR_OR_CONST DWORD_ OPEN_EXISTING_ = OPEN_EXISTING;
BOOST_CONSTEXPR_OR_CONST DWORD_ OPEN_ALWAYS_ = OPEN_ALWAYS;
BOOST_CONSTEXPR_OR_CONST DWORD_ TRUNCATE_EXISTING_ = TRUNCATE_EXISTING;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_SHARE_READ_ = FILE_SHARE_READ;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_SHARE_WRITE_ = FILE_SHARE_WRITE;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_SHARE_DELETE_ = FILE_SHARE_DELETE;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_BEGIN_ = FILE_BEGIN;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_CURRENT_ = FILE_CURRENT;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_END_ = FILE_END;
#else // defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST DWORD_ INVALID_FILE_SIZE_ = ((DWORD_)0xFFFFFFFF);
BOOST_CONSTEXPR_OR_CONST DWORD_ INVALID_SET_FILE_POINTER_ = ((DWORD_)-1);
BOOST_CONSTEXPR_OR_CONST DWORD_ INVALID_FILE_ATTRIBUTES_ = ((DWORD_)-1);
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_READONLY_ = 0x00000001;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_HIDDEN_ = 0x00000002;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_SYSTEM_ = 0x00000004;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_DIRECTORY_ = 0x00000010;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_ARCHIVE_ = 0x00000020;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_DEVICE_ = 0x00000040;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_NORMAL_ = 0x00000080;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_TEMPORARY_ = 0x00000100;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_SPARSE_FILE_ = 0x00000200;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_REPARSE_POINT_ = 0x00000400;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_COMPRESSED_ = 0x00000800;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_OFFLINE_ = 0x00001000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_NOT_CONTENT_INDEXED_ = 0x00002000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_ENCRYPTED_ = 0x00004000;
BOOST_CONSTEXPR_OR_CONST DWORD_ CREATE_NEW_ = 1;
BOOST_CONSTEXPR_OR_CONST DWORD_ CREATE_ALWAYS_ = 2;
BOOST_CONSTEXPR_OR_CONST DWORD_ OPEN_EXISTING_ = 3;
BOOST_CONSTEXPR_OR_CONST DWORD_ OPEN_ALWAYS_ = 4;
BOOST_CONSTEXPR_OR_CONST DWORD_ TRUNCATE_EXISTING_ = 5;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_SHARE_READ_ = 0x00000001;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_SHARE_WRITE_ = 0x00000002;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_SHARE_DELETE_ = 0x00000004;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_BEGIN_ = 0;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_CURRENT_ = 1;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_END_ = 2;
#endif // defined( BOOST_USE_WINDOWS_H )
// Some of these constants are not defined by Windows SDK in MinGW or older MSVC
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_FLAG_WRITE_THROUGH_ = 0x80000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_FLAG_OVERLAPPED_ = 0x40000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_FLAG_NO_BUFFERING_ = 0x20000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_FLAG_RANDOM_ACCESS_ = 0x10000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_FLAG_SEQUENTIAL_SCAN_ = 0x08000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_FLAG_DELETE_ON_CLOSE_ = 0x04000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_FLAG_BACKUP_SEMANTICS_ = 0x02000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_FLAG_POSIX_SEMANTICS_ = 0x01000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_FLAG_SESSION_AWARE_ = 0x00800000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_FLAG_OPEN_REPARSE_POINT_ = 0x00200000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_FLAG_OPEN_NO_RECALL_ = 0x00100000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_FLAG_FIRST_PIPE_INSTANCE_ = 0x00080000;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN8
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_FLAG_OPEN_REQUIRING_OPLOCK_ = 0x00040000;
#endif
// This constant is not defined in Windows SDK up until 6.0A
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_VIRTUAL_ = 0x00010000;
// These constants are not defined in Windows SDK up until 8.0 and MinGW/MinGW-w64 (as of 2016-02-14).
// They are documented to be supported only since Windows 8/Windows Server 2012
// but defined unconditionally.
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_INTEGRITY_STREAM_ = 0x00008000;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_NO_SCRUB_DATA_ = 0x00020000;
// Undocumented
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_ATTRIBUTE_EA_ = 0x00040000;
#if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
#if !defined( BOOST_NO_ANSI_APIS )
using ::AreFileApisANSI;
BOOST_FORCEINLINE HANDLE_ CreateFileA(
LPCSTR_ lpFileName,
DWORD_ dwDesiredAccess,
DWORD_ dwShareMode,
SECURITY_ATTRIBUTES_* lpSecurityAttributes,
DWORD_ dwCreationDisposition,
DWORD_ dwFlagsAndAttributes,
HANDLE_ hTemplateFile)
{
return ::CreateFileA(
lpFileName,
dwDesiredAccess,
dwShareMode,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSecurityAttributes),
dwCreationDisposition,
dwFlagsAndAttributes,
hTemplateFile);
}
BOOST_FORCEINLINE HANDLE_ create_file(
LPCSTR_ lpFileName,
DWORD_ dwDesiredAccess,
DWORD_ dwShareMode,
SECURITY_ATTRIBUTES_* lpSecurityAttributes,
DWORD_ dwCreationDisposition,
DWORD_ dwFlagsAndAttributes,
HANDLE_ hTemplateFile)
{
return ::CreateFileA(
lpFileName,
dwDesiredAccess,
dwShareMode,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSecurityAttributes),
dwCreationDisposition,
dwFlagsAndAttributes,
hTemplateFile);
}
typedef struct BOOST_MAY_ALIAS _WIN32_FIND_DATAA {
DWORD_ dwFileAttributes;
FILETIME_ ftCreationTime;
FILETIME_ ftLastAccessTime;
FILETIME_ ftLastWriteTime;
DWORD_ nFileSizeHigh;
DWORD_ nFileSizeLow;
DWORD_ dwReserved0;
DWORD_ dwReserved1;
CHAR_ cFileName[MAX_PATH_];
CHAR_ cAlternateFileName[14];
#ifdef _MAC
DWORD_ dwFileType;
DWORD_ dwCreatorType;
WORD_ wFinderFlags;
#endif
} WIN32_FIND_DATAA_, *PWIN32_FIND_DATAA_, *LPWIN32_FIND_DATAA_;
BOOST_FORCEINLINE HANDLE_ FindFirstFileA(LPCSTR_ lpFileName, WIN32_FIND_DATAA_* lpFindFileData)
{
return ::FindFirstFileA(lpFileName, reinterpret_cast< ::_WIN32_FIND_DATAA* >(lpFindFileData));
}
BOOST_FORCEINLINE HANDLE_ find_first_file(LPCSTR_ lpFileName, WIN32_FIND_DATAA_* lpFindFileData)
{
return ::FindFirstFileA(lpFileName, reinterpret_cast< ::_WIN32_FIND_DATAA* >(lpFindFileData));
}
BOOST_FORCEINLINE BOOL_ FindNextFileA(HANDLE_ hFindFile, WIN32_FIND_DATAA_* lpFindFileData)
{
return ::FindNextFileA(hFindFile, reinterpret_cast< ::_WIN32_FIND_DATAA* >(lpFindFileData));
}
BOOST_FORCEINLINE BOOL_ find_next_file(HANDLE_ hFindFile, WIN32_FIND_DATAA_* lpFindFileData)
{
return ::FindNextFileA(hFindFile, reinterpret_cast< ::_WIN32_FIND_DATAA* >(lpFindFileData));
}
#endif // !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ CreateFileW(
LPCWSTR_ lpFileName,
DWORD_ dwDesiredAccess,
DWORD_ dwShareMode,
SECURITY_ATTRIBUTES_* lpSecurityAttributes,
DWORD_ dwCreationDisposition,
DWORD_ dwFlagsAndAttributes,
HANDLE_ hTemplateFile)
{
return ::CreateFileW(
lpFileName,
dwDesiredAccess,
dwShareMode,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSecurityAttributes),
dwCreationDisposition,
dwFlagsAndAttributes,
hTemplateFile);
}
BOOST_FORCEINLINE HANDLE_ create_file(
LPCWSTR_ lpFileName,
DWORD_ dwDesiredAccess,
DWORD_ dwShareMode,
SECURITY_ATTRIBUTES_* lpSecurityAttributes,
DWORD_ dwCreationDisposition,
DWORD_ dwFlagsAndAttributes,
HANDLE_ hTemplateFile)
{
return ::CreateFileW(
lpFileName,
dwDesiredAccess,
dwShareMode,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpSecurityAttributes),
dwCreationDisposition,
dwFlagsAndAttributes,
hTemplateFile);
}
typedef struct BOOST_MAY_ALIAS _WIN32_FIND_DATAW {
DWORD_ dwFileAttributes;
FILETIME_ ftCreationTime;
FILETIME_ ftLastAccessTime;
FILETIME_ ftLastWriteTime;
DWORD_ nFileSizeHigh;
DWORD_ nFileSizeLow;
DWORD_ dwReserved0;
DWORD_ dwReserved1;
WCHAR_ cFileName[MAX_PATH_];
WCHAR_ cAlternateFileName[14];
#ifdef _MAC
DWORD_ dwFileType;
DWORD_ dwCreatorType;
WORD_ wFinderFlags;
#endif
} WIN32_FIND_DATAW_, *PWIN32_FIND_DATAW_, *LPWIN32_FIND_DATAW_;
typedef struct BOOST_MAY_ALIAS _BY_HANDLE_FILE_INFORMATION {
DWORD_ dwFileAttributes;
FILETIME_ ftCreationTime;
FILETIME_ ftLastAccessTime;
FILETIME_ ftLastWriteTime;
DWORD_ dwVolumeSerialNumber;
DWORD_ nFileSizeHigh;
DWORD_ nFileSizeLow;
DWORD_ nNumberOfLinks;
DWORD_ nFileIndexHigh;
DWORD_ nFileIndexLow;
} BY_HANDLE_FILE_INFORMATION_, *PBY_HANDLE_FILE_INFORMATION_, *LPBY_HANDLE_FILE_INFORMATION_;
BOOST_FORCEINLINE HANDLE_ FindFirstFileW(LPCWSTR_ lpFileName, WIN32_FIND_DATAW_* lpFindFileData)
{
return ::FindFirstFileW(lpFileName, reinterpret_cast< ::_WIN32_FIND_DATAW* >(lpFindFileData));
}
BOOST_FORCEINLINE HANDLE_ find_first_file(LPCWSTR_ lpFileName, WIN32_FIND_DATAW_* lpFindFileData)
{
return ::FindFirstFileW(lpFileName, reinterpret_cast< ::_WIN32_FIND_DATAW* >(lpFindFileData));
}
BOOST_FORCEINLINE BOOL_ FindNextFileW(HANDLE_ hFindFile, WIN32_FIND_DATAW_* lpFindFileData)
{
return ::FindNextFileW(hFindFile, reinterpret_cast< ::_WIN32_FIND_DATAW* >(lpFindFileData));
}
BOOST_FORCEINLINE BOOL_ find_next_file(HANDLE_ hFindFile, WIN32_FIND_DATAW_* lpFindFileData)
{
return ::FindNextFileW(hFindFile, reinterpret_cast< ::_WIN32_FIND_DATAW* >(lpFindFileData));
}
BOOST_FORCEINLINE BOOL_ GetFileInformationByHandle(HANDLE_ h, BY_HANDLE_FILE_INFORMATION_* info)
{
return ::GetFileInformationByHandle(h, reinterpret_cast< ::_BY_HANDLE_FILE_INFORMATION* >(info));
}
using ::LockFile;
BOOST_FORCEINLINE BOOL_ LockFileEx(
HANDLE_ hFile,
DWORD_ dwFlags,
DWORD_ dwReserved,
DWORD_ nNumberOfBytesToLockLow,
DWORD_ nNumberOfBytesToLockHigh,
OVERLAPPED_* lpOverlapped)
{
return ::LockFileEx(hFile, dwFlags, dwReserved, nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh, reinterpret_cast< ::_OVERLAPPED* >(lpOverlapped));
}
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WINXP
using ::SetFileValidData;
#endif
using ::UnlockFile;
BOOST_FORCEINLINE BOOL_ UnlockFileEx(
HANDLE_ hFile,
DWORD_ dwReserved,
DWORD_ nNumberOfBytesToUnlockLow,
DWORD_ nNumberOfBytesToUnlockHigh,
OVERLAPPED_* lpOverlapped)
{
return ::UnlockFileEx(hFile, dwReserved, nNumberOfBytesToUnlockLow, nNumberOfBytesToUnlockHigh, reinterpret_cast< ::_OVERLAPPED* >(lpOverlapped));
}
#endif // BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
#if BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM
#if !defined( BOOST_NO_ANSI_APIS )
using ::DeleteFileA;
BOOST_FORCEINLINE BOOL_ delete_file(LPCSTR_ lpFileName)
{
return ::DeleteFileA(lpFileName);
}
using ::MoveFileExA;
BOOST_FORCEINLINE BOOL_ move_file(LPCSTR_ lpExistingFileName, LPCSTR_ lpNewFileName, DWORD_ dwFlags)
{
return ::MoveFileExA(lpExistingFileName, lpNewFileName, dwFlags);
}
#endif
using ::DeleteFileW;
BOOST_FORCEINLINE BOOL_ delete_file(LPCWSTR_ lpFileName)
{
return ::DeleteFileW(lpFileName);
}
using ::FindClose;
using ::MoveFileExW;
BOOST_FORCEINLINE BOOL_ move_file(LPCWSTR_ lpExistingFileName, LPCWSTR_ lpNewFileName, DWORD_ dwFlags)
{
return ::MoveFileExW(lpExistingFileName, lpNewFileName, dwFlags);
}
BOOST_FORCEINLINE BOOL_ ReadFile(
HANDLE_ hFile,
LPVOID_ lpBuffer,
DWORD_ nNumberOfBytesToWrite,
LPDWORD_ lpNumberOfBytesWritten,
OVERLAPPED_* lpOverlapped)
{
return ::ReadFile(hFile, lpBuffer, nNumberOfBytesToWrite, lpNumberOfBytesWritten, reinterpret_cast< ::_OVERLAPPED* >(lpOverlapped));
}
using ::SetEndOfFile;
BOOST_FORCEINLINE BOOL_ WriteFile(
HANDLE_ hFile,
LPCVOID_ lpBuffer,
DWORD_ nNumberOfBytesToWrite,
LPDWORD_ lpNumberOfBytesWritten,
OVERLAPPED_* lpOverlapped)
{
return ::WriteFile(hFile, lpBuffer, nNumberOfBytesToWrite, lpNumberOfBytesWritten, reinterpret_cast< ::_OVERLAPPED* >(lpOverlapped));
}
#endif // BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
#if !defined( BOOST_NO_ANSI_APIS )
using ::GetFileAttributesA;
BOOST_FORCEINLINE DWORD_ get_file_attributes(LPCSTR_ lpFileName)
{
return ::GetFileAttributesA(lpFileName);
}
#endif
using ::GetFileAttributesW;
BOOST_FORCEINLINE DWORD_ get_file_attributes(LPCWSTR_ lpFileName)
{
return ::GetFileAttributesW(lpFileName);
}
BOOST_FORCEINLINE BOOL_ GetFileSizeEx(HANDLE_ hFile, LARGE_INTEGER_* lpFileSize)
{
return ::GetFileSizeEx(hFile, reinterpret_cast< ::_LARGE_INTEGER* >(lpFileSize));
}
using ::SetFilePointer;
#endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_FILE_MANAGEMENT_HPP_INCLUDED_

View File

@@ -0,0 +1,262 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015 Andrey Semashev
* Copyright 2016 Jorge Lodos
* Copyright 2017 James E. King, III
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_FILE_MAPPING_HPP_INCLUDED_
#define BOOST_WINAPI_FILE_MAPPING_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
/*
* UWP:
* API SDK 8 SDK 10
* CreateFileMapping DESKTOP - DESKTOP | SYSTEM
* FlushViewOfFile APP - APP | SYSTEM
* MapViewOfFile DESKTOP - DESKTOP | SYSTEM
* MapViewOfFileEx DESKTOP - DESKTOP | SYSTEM
* OpenFileMapping DESKTOP - DESKTOP | SYSTEM
* UnmapViewOfFile APP - APP | SYSTEM
*/
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if BOOST_WINAPI_PARTITION_DESKTOP
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_WINAPI_IMPORT boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
CreateFileMappingA(
boost::winapi::HANDLE_ hFile,
::_SECURITY_ATTRIBUTES* lpFileMappingAttributes,
boost::winapi::DWORD_ flProtect,
boost::winapi::DWORD_ dwMaximumSizeHigh,
boost::winapi::DWORD_ dwMaximumSizeLow,
boost::winapi::LPCSTR_ lpName);
BOOST_WINAPI_IMPORT boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
OpenFileMappingA(
boost::winapi::DWORD_ dwDesiredAccess,
boost::winapi::BOOL_ bInheritHandle,
boost::winapi::LPCSTR_ lpName);
#endif // !defined( BOOST_NO_ANSI_APIS )
#endif // BOOST_WINAPI_PARTITION_DESKTOP
#if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
CreateFileMappingW(
boost::winapi::HANDLE_ hFile,
::_SECURITY_ATTRIBUTES* lpFileMappingAttributes,
boost::winapi::DWORD_ flProtect,
boost::winapi::DWORD_ dwMaximumSizeHigh,
boost::winapi::DWORD_ dwMaximumSizeLow,
boost::winapi::LPCWSTR_ lpName);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::LPVOID_ BOOST_WINAPI_WINAPI_CC
MapViewOfFile(
boost::winapi::HANDLE_ hFileMappingObject,
boost::winapi::DWORD_ dwDesiredAccess,
boost::winapi::DWORD_ dwFileOffsetHigh,
boost::winapi::DWORD_ dwFileOffsetLow,
boost::winapi::SIZE_T_ dwNumberOfBytesToMap);
BOOST_WINAPI_IMPORT boost::winapi::LPVOID_ BOOST_WINAPI_WINAPI_CC
MapViewOfFileEx(
boost::winapi::HANDLE_ hFileMappingObject,
boost::winapi::DWORD_ dwDesiredAccess,
boost::winapi::DWORD_ dwFileOffsetHigh,
boost::winapi::DWORD_ dwFileOffsetLow,
boost::winapi::SIZE_T_ dwNumberOfBytesToMap,
boost::winapi::LPVOID_ lpBaseAddress);
BOOST_WINAPI_IMPORT boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
OpenFileMappingW(
boost::winapi::DWORD_ dwDesiredAccess,
boost::winapi::BOOL_ bInheritHandle,
boost::winapi::LPCWSTR_ lpName);
#endif // BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
#if BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
FlushViewOfFile(
boost::winapi::LPCVOID_ lpBaseAddress,
boost::winapi::SIZE_T_ dwNumberOfBytesToFlush);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
UnmapViewOfFile(boost::winapi::LPCVOID_ lpBaseAddress);
#endif // BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM
} // extern "C"
#endif // !defined( BOOST_USE_WINDOWS_H )
namespace boost {
namespace winapi {
#if defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST DWORD_ SEC_FILE_ = SEC_FILE;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEC_IMAGE_ = SEC_IMAGE;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEC_RESERVE_ = SEC_RESERVE;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEC_COMMIT_ = SEC_COMMIT;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEC_NOCACHE_ = SEC_NOCACHE;
// These permission flags are undocumented and some of them are equivalent to the FILE_MAP_* flags.
// SECTION_QUERY enables NtQuerySection.
// http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FNT%20Objects%2FSection%2FNtQuerySection.html
BOOST_CONSTEXPR_OR_CONST DWORD_ SECTION_QUERY_ = SECTION_QUERY;
BOOST_CONSTEXPR_OR_CONST DWORD_ SECTION_MAP_WRITE_ = SECTION_MAP_WRITE;
BOOST_CONSTEXPR_OR_CONST DWORD_ SECTION_MAP_READ_ = SECTION_MAP_READ;
BOOST_CONSTEXPR_OR_CONST DWORD_ SECTION_MAP_EXECUTE_ = SECTION_MAP_EXECUTE;
BOOST_CONSTEXPR_OR_CONST DWORD_ SECTION_EXTEND_SIZE_ = SECTION_EXTEND_SIZE;
BOOST_CONSTEXPR_OR_CONST DWORD_ SECTION_ALL_ACCESS_ = SECTION_ALL_ACCESS;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_MAP_COPY_ = FILE_MAP_COPY;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_MAP_WRITE_ = FILE_MAP_WRITE;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_MAP_READ_ = FILE_MAP_READ;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_MAP_ALL_ACCESS_ = FILE_MAP_ALL_ACCESS;
#else // defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST DWORD_ SEC_FILE_ = 0x800000;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEC_IMAGE_ = 0x1000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEC_RESERVE_ = 0x4000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEC_COMMIT_ = 0x8000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEC_NOCACHE_ = 0x10000000;
// These permission flags are undocumented and some of them are equivalent to the FILE_MAP_* flags.
// SECTION_QUERY enables NtQuerySection.
// http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FNT%20Objects%2FSection%2FNtQuerySection.html
BOOST_CONSTEXPR_OR_CONST DWORD_ SECTION_QUERY_ = 0x00000001;
BOOST_CONSTEXPR_OR_CONST DWORD_ SECTION_MAP_WRITE_ = 0x00000002;
BOOST_CONSTEXPR_OR_CONST DWORD_ SECTION_MAP_READ_ = 0x00000004;
BOOST_CONSTEXPR_OR_CONST DWORD_ SECTION_MAP_EXECUTE_ = 0x00000008;
BOOST_CONSTEXPR_OR_CONST DWORD_ SECTION_EXTEND_SIZE_ = 0x00000010;
BOOST_CONSTEXPR_OR_CONST DWORD_ SECTION_ALL_ACCESS_ = 0x000F001F; // STANDARD_RIGHTS_REQUIRED | SECTION_*
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_MAP_COPY_ = SECTION_QUERY_;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_MAP_WRITE_ = SECTION_MAP_WRITE_;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_MAP_READ_ = SECTION_MAP_READ_;
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_MAP_ALL_ACCESS_ = SECTION_ALL_ACCESS_;
#endif // defined( BOOST_USE_WINDOWS_H )
// These constants are not defined in Windows SDK up until the one shipped with MSVC 8 and MinGW (as of 2016-02-14)
BOOST_CONSTEXPR_OR_CONST DWORD_ SECTION_MAP_EXECUTE_EXPLICIT_ = 0x00000020; // not included in SECTION_ALL_ACCESS
BOOST_CONSTEXPR_OR_CONST DWORD_ FILE_MAP_EXECUTE_ = SECTION_MAP_EXECUTE_EXPLICIT_; // not included in FILE_MAP_ALL_ACCESS
// These constants are not defined in Windows SDK up until 6.0A and MinGW (as of 2016-02-14)
BOOST_CONSTEXPR_OR_CONST DWORD_ SEC_PROTECTED_IMAGE_ = 0x2000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEC_WRITECOMBINE_ = 0x40000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEC_LARGE_PAGES_ = 0x80000000;
BOOST_CONSTEXPR_OR_CONST DWORD_ SEC_IMAGE_NO_EXECUTE_ = (SEC_IMAGE_ | SEC_NOCACHE_);
#if BOOST_WINAPI_PARTITION_DESKTOP
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE HANDLE_ CreateFileMappingA(
HANDLE_ hFile,
SECURITY_ATTRIBUTES_* lpFileMappingAttributes,
DWORD_ flProtect,
DWORD_ dwMaximumSizeHigh,
DWORD_ dwMaximumSizeLow,
LPCSTR_ lpName)
{
return ::CreateFileMappingA(
hFile,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpFileMappingAttributes),
flProtect,
dwMaximumSizeHigh,
dwMaximumSizeLow,
lpName);
}
BOOST_FORCEINLINE HANDLE_ create_file_mapping(
HANDLE_ hFile,
SECURITY_ATTRIBUTES_* lpFileMappingAttributes,
DWORD_ flProtect,
DWORD_ dwMaximumSizeHigh,
DWORD_ dwMaximumSizeLow,
LPCSTR_ lpName)
{
return ::CreateFileMappingA(
hFile,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpFileMappingAttributes),
flProtect,
dwMaximumSizeHigh,
dwMaximumSizeLow,
lpName);
}
using ::OpenFileMappingA;
BOOST_FORCEINLINE HANDLE_ open_file_mapping(DWORD_ dwDesiredAccess, BOOL_ bInheritHandle, LPCSTR_ lpName)
{
return ::OpenFileMappingA(dwDesiredAccess, bInheritHandle, lpName);
}
#endif
#endif // BOOST_WINAPI_PARTITION_DESKTOP
#if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
BOOST_FORCEINLINE HANDLE_ CreateFileMappingW(
HANDLE_ hFile,
SECURITY_ATTRIBUTES_* lpFileMappingAttributes,
DWORD_ flProtect,
DWORD_ dwMaximumSizeHigh,
DWORD_ dwMaximumSizeLow,
LPCWSTR_ lpName)
{
return ::CreateFileMappingW(
hFile,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpFileMappingAttributes),
flProtect,
dwMaximumSizeHigh,
dwMaximumSizeLow,
lpName);
}
BOOST_FORCEINLINE HANDLE_ create_file_mapping(
HANDLE_ hFile,
SECURITY_ATTRIBUTES_* lpFileMappingAttributes,
DWORD_ flProtect,
DWORD_ dwMaximumSizeHigh,
DWORD_ dwMaximumSizeLow,
LPCWSTR_ lpName)
{
return ::CreateFileMappingW(
hFile,
reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpFileMappingAttributes),
flProtect,
dwMaximumSizeHigh,
dwMaximumSizeLow,
lpName);
}
using ::MapViewOfFile;
using ::MapViewOfFileEx;
using ::OpenFileMappingW;
BOOST_FORCEINLINE HANDLE_ open_file_mapping(DWORD_ dwDesiredAccess, BOOL_ bInheritHandle, LPCWSTR_ lpName)
{
return ::OpenFileMappingW(dwDesiredAccess, bInheritHandle, lpName);
}
#endif // BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
#if BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM
using ::FlushViewOfFile;
using ::UnmapViewOfFile;
#endif // BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_FILE_MAPPING_HPP_INCLUDED_

View File

@@ -0,0 +1,34 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_GET_CURRENT_PROCESS_HPP_INCLUDED_
#define BOOST_WINAPI_GET_CURRENT_PROCESS_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
// Windows CE define GetCurrentProcess as an inline function in kfuncs.h
#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE )
extern "C" {
BOOST_WINAPI_IMPORT boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC GetCurrentProcess(BOOST_WINAPI_DETAIL_VOID);
}
#endif
namespace boost {
namespace winapi {
using ::GetCurrentProcess;
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_GET_CURRENT_PROCESS_HPP_INCLUDED_

View File

@@ -0,0 +1,33 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_GET_CURRENT_PROCESS_ID_HPP_INCLUDED_
#define BOOST_WINAPI_GET_CURRENT_PROCESS_ID_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
// Windows CE define GetCurrentProcessId as an inline function in kfuncs.h
#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE )
extern "C" {
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC GetCurrentProcessId(BOOST_WINAPI_DETAIL_VOID);
}
#endif
namespace boost {
namespace winapi {
using ::GetCurrentProcessId;
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_GET_CURRENT_PROCESS_ID_HPP_INCLUDED_

View File

@@ -0,0 +1,34 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_GET_CURRENT_THREAD_HPP_INCLUDED_
#define BOOST_WINAPI_GET_CURRENT_THREAD_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
// Windows CE define GetCurrentThread as an inline function in kfuncs.h
#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE )
extern "C" {
BOOST_WINAPI_IMPORT boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC GetCurrentThread(BOOST_WINAPI_DETAIL_VOID);
}
#endif
namespace boost {
namespace winapi {
using ::GetCurrentThread;
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_GET_CURRENT_THREAD_HPP_INCLUDED_

View File

@@ -0,0 +1,34 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_GET_CURRENT_THREAD_ID_HPP_INCLUDED_
#define BOOST_WINAPI_GET_CURRENT_THREAD_ID_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
// Windows CE define GetCurrentThreadId as an inline function in kfuncs.h
#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE )
extern "C" {
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC GetCurrentThreadId(BOOST_WINAPI_DETAIL_VOID);
}
#endif
namespace boost {
namespace winapi {
using ::GetCurrentThreadId;
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_GET_CURRENT_THREAD_ID_HPP_INCLUDED_

View File

@@ -0,0 +1,33 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_GET_LAST_ERROR_HPP_INCLUDED_
#define BOOST_WINAPI_GET_LAST_ERROR_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC GetLastError(BOOST_WINAPI_DETAIL_VOID);
}
#endif
namespace boost {
namespace winapi {
using ::GetLastError;
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_GET_LAST_ERROR_HPP_INCLUDED_

View File

@@ -0,0 +1,81 @@
/*
* Copyright 2020 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_GET_PROC_ADDRESS_HPP_INCLUDED_
#define BOOST_WINAPI_GET_PROC_ADDRESS_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
#include <boost/winapi/detail/header.hpp>
#if !defined(BOOST_USE_WINDOWS_H)
namespace boost { namespace winapi {
#ifdef _WIN64
typedef INT_PTR_ (BOOST_WINAPI_WINAPI_CC *FARPROC_)();
typedef INT_PTR_ (BOOST_WINAPI_WINAPI_CC *NEARPROC_)();
typedef INT_PTR_ (BOOST_WINAPI_WINAPI_CC *PROC_)();
#else
typedef int (BOOST_WINAPI_WINAPI_CC *FARPROC_)();
typedef int (BOOST_WINAPI_WINAPI_CC *NEARPROC_)();
typedef int (BOOST_WINAPI_WINAPI_CC *PROC_)();
#endif // _WIN64
}} // namespace boost::winapi
extern "C" {
#if !defined(UNDER_CE)
BOOST_WINAPI_IMPORT boost::winapi::FARPROC_ BOOST_WINAPI_WINAPI_CC
GetProcAddress(boost::winapi::HMODULE_ hModule, boost::winapi::LPCSTR_ lpProcName);
#else
// On Windows CE there are two functions: GetProcAddressA (since Windows CE 3.0) and GetProcAddressW.
// GetProcAddress is a macro that is _always_ defined to GetProcAddressW.
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::FARPROC_ BOOST_WINAPI_WINAPI_CC
GetProcAddressA(boost::winapi::HMODULE_ hModule, boost::winapi::LPCSTR_ lpProcName);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::FARPROC_ BOOST_WINAPI_WINAPI_CC
GetProcAddressW(boost::winapi::HMODULE_ hModule, boost::winapi::LPCWSTR_ lpProcName);
#endif
} // extern "C"
#endif // !defined(BOOST_USE_WINDOWS_H)
namespace boost {
namespace winapi {
#if defined(BOOST_USE_WINDOWS_H)
typedef ::FARPROC FARPROC_;
typedef ::NEARPROC NEARPROC_;
typedef ::PROC PROC_;
#endif // defined(BOOST_USE_WINDOWS_H)
#if !defined(UNDER_CE)
// For backward compatibility, don't use directly. Use get_proc_address instead.
using ::GetProcAddress;
#else
using ::GetProcAddressA;
using ::GetProcAddressW;
#endif
BOOST_FORCEINLINE FARPROC_ get_proc_address(HMODULE_ hModule, LPCSTR_ lpProcName)
{
#if !defined(UNDER_CE)
return ::GetProcAddress(hModule, lpProcName);
#else
return ::GetProcAddressA(hModule, lpProcName);
#endif
}
} // namespace winapi
} // namespace boost
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
#endif // BOOST_WINAPI_GET_PROC_ADDRESS_HPP_INCLUDED_

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_GET_PROCESS_TIMES_HPP_INCLUDED_
#define BOOST_WINAPI_GET_PROCESS_TIMES_HPP_INCLUDED_
#include <boost/winapi/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
// Windows CE does not define GetProcessTimes
#if !defined( UNDER_CE )
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/time.hpp>
#include <boost/winapi/detail/header.hpp>
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
GetProcessTimes(
boost::winapi::HANDLE_ hProcess,
::_FILETIME* lpCreationTime,
::_FILETIME* lpExitTime,
::_FILETIME* lpKernelTime,
::_FILETIME* lpUserTime);
}
#endif
namespace boost {
namespace winapi {
BOOST_FORCEINLINE BOOL_ GetProcessTimes(
HANDLE_ hProcess,
LPFILETIME_ lpCreationTime,
LPFILETIME_ lpExitTime,
LPFILETIME_ lpKernelTime,
LPFILETIME_ lpUserTime)
{
return ::GetProcessTimes(
hProcess,
reinterpret_cast< ::_FILETIME* >(lpCreationTime),
reinterpret_cast< ::_FILETIME* >(lpExitTime),
reinterpret_cast< ::_FILETIME* >(lpKernelTime),
reinterpret_cast< ::_FILETIME* >(lpUserTime));
}
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
#endif // !defined( UNDER_CE )
#endif // BOOST_WINAPI_GET_PROCESS_TIMES_HPP_INCLUDED_

View File

@@ -0,0 +1,64 @@
/*
* Copyright 2016 Klemens D. Morgenstern
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_GET_SYSTEM_DIRECTORY_HPP_INCLUDED_
#define BOOST_WINAPI_GET_SYSTEM_DIRECTORY_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_WINAPI_PARTITION_DESKTOP
#include <boost/winapi/detail/header.hpp>
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_WINAPI_IMPORT boost::winapi::UINT_ BOOST_WINAPI_WINAPI_CC
GetSystemDirectoryA(
boost::winapi::LPSTR_ lpBuffer,
boost::winapi::UINT_ uSize);
#endif
BOOST_WINAPI_IMPORT boost::winapi::UINT_ BOOST_WINAPI_WINAPI_CC
GetSystemDirectoryW(
boost::winapi::LPWSTR_ lpBuffer,
boost::winapi::UINT_ uSize);
} // extern "C"
#endif
namespace boost {
namespace winapi {
#if !defined( BOOST_NO_ANSI_APIS )
using ::GetSystemDirectoryA;
#endif
using ::GetSystemDirectoryW;
#if !defined( BOOST_NO_ANSI_APIS )
BOOST_FORCEINLINE UINT_ get_system_directory(LPSTR_ lpBuffer, UINT_ uSize)
{
return ::GetSystemDirectoryA(lpBuffer, uSize);
}
#endif
BOOST_FORCEINLINE UINT_ get_system_directory(LPWSTR_ lpBuffer, UINT_ uSize)
{
return ::GetSystemDirectoryW(lpBuffer, uSize);
}
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_PARTITION_DESKTOP
#endif // BOOST_WINAPI_GET_SYSTEM_DIRECTORY_HPP_INCLUDED_

View File

@@ -0,0 +1,59 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_GET_THREAD_TIMES_HPP_INCLUDED_
#define BOOST_WINAPI_GET_THREAD_TIMES_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/time.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
#include <boost/winapi/detail/header.hpp>
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
GetThreadTimes(
boost::winapi::HANDLE_ hThread,
::_FILETIME* lpCreationTime,
::_FILETIME* lpExitTime,
::_FILETIME* lpKernelTime,
::_FILETIME* lpUserTime);
}
#endif
namespace boost {
namespace winapi {
BOOST_FORCEINLINE BOOL_ GetThreadTimes(
HANDLE_ hThread,
LPFILETIME_ lpCreationTime,
LPFILETIME_ lpExitTime,
LPFILETIME_ lpKernelTime,
LPFILETIME_ lpUserTime)
{
return ::GetThreadTimes(
hThread,
reinterpret_cast< ::_FILETIME* >(lpCreationTime),
reinterpret_cast< ::_FILETIME* >(lpExitTime),
reinterpret_cast< ::_FILETIME* >(lpKernelTime),
reinterpret_cast< ::_FILETIME* >(lpUserTime));
}
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
#endif // BOOST_WINAPI_GET_THREAD_TIMES_HPP_INCLUDED_

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2016 Klemens D. Morgenstern
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_HANDLE_INFO_HPP_INCLUDED_
#define BOOST_WINAPI_HANDLE_INFO_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_WINAPI_PARTITION_DESKTOP
#include <boost/winapi/detail/header.hpp>
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
GetHandleInformation(
boost::winapi::HANDLE_ hObject,
boost::winapi::LPDWORD_ lpdwFlags);
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
SetHandleInformation(
boost::winapi::HANDLE_ hObject,
boost::winapi::DWORD_ dwMask,
boost::winapi::DWORD_ dwFlags);
} // extern "C"
#endif
namespace boost {
namespace winapi {
using ::GetHandleInformation;
using ::SetHandleInformation;
#if defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST DWORD_ HANDLE_FLAG_INHERIT_ = HANDLE_FLAG_INHERIT;
BOOST_CONSTEXPR_OR_CONST DWORD_ HANDLE_FLAG_PROTECT_FROM_CLOSE_ = HANDLE_FLAG_PROTECT_FROM_CLOSE;
#else
BOOST_CONSTEXPR_OR_CONST DWORD_ HANDLE_FLAG_INHERIT_ = 0x1;
BOOST_CONSTEXPR_OR_CONST DWORD_ HANDLE_FLAG_PROTECT_FROM_CLOSE_ = 0x2;
#endif
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_PARTITION_DESKTOP
#endif // BOOST_WINAPI_HANDLE_INFO_HPP_INCLUDED_

View File

@@ -0,0 +1,75 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_HANDLES_HPP_INCLUDED_
#define BOOST_WINAPI_HANDLES_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
extern "C" {
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
CloseHandle(boost::winapi::HANDLE_ handle);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
DuplicateHandle(
boost::winapi::HANDLE_ hSourceProcessHandle,
boost::winapi::HANDLE_ hSourceHandle,
boost::winapi::HANDLE_ hTargetProcessHandle,
boost::winapi::HANDLE_* lpTargetHandle,
boost::winapi::DWORD_ dwDesiredAccess,
boost::winapi::BOOL_ bInheritHandle,
boost::winapi::DWORD_ dwOptions);
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN10
BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
CompareObjectHandles(
boost::winapi::HANDLE_ hFirstObjectHandle,
boost::winapi::HANDLE_ hSecondObjectHandle);
#endif
} // extern "C"
#endif
namespace boost {
namespace winapi {
using ::CloseHandle;
using ::DuplicateHandle;
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN10
using ::CompareObjectHandles;
#endif
// Note: MSVC-14.1 does not interpret INVALID_HANDLE_VALUE_ initializer as a constant expression
#if defined( BOOST_USE_WINDOWS_H )
BOOST_CONSTEXPR_OR_CONST DWORD_ DUPLICATE_CLOSE_SOURCE_ = DUPLICATE_CLOSE_SOURCE;
BOOST_CONSTEXPR_OR_CONST DWORD_ DUPLICATE_SAME_ACCESS_ = DUPLICATE_SAME_ACCESS;
const HANDLE_ INVALID_HANDLE_VALUE_ = INVALID_HANDLE_VALUE;
#else
BOOST_CONSTEXPR_OR_CONST DWORD_ DUPLICATE_CLOSE_SOURCE_ = 1;
BOOST_CONSTEXPR_OR_CONST DWORD_ DUPLICATE_SAME_ACCESS_ = 2;
const HANDLE_ INVALID_HANDLE_VALUE_ = (HANDLE_)(-1);
#endif
BOOST_CONSTEXPR_OR_CONST DWORD_ duplicate_close_source = DUPLICATE_CLOSE_SOURCE_;
BOOST_CONSTEXPR_OR_CONST DWORD_ duplicate_same_access = DUPLICATE_SAME_ACCESS_;
// Note: The "unused" attribute here should not be necessary because the variable is a constant.
// However, MinGW gcc 5.3 spams warnings about this particular constant.
const HANDLE_ invalid_handle_value BOOST_ATTRIBUTE_UNUSED = INVALID_HANDLE_VALUE_;
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_HANDLES_HPP_INCLUDED_

View File

@@ -0,0 +1,86 @@
/*
* Copyright 2010 Vicente J. Botet Escriba
* Copyright 2015, 2017 Andrey Semashev
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_HEAP_MEMORY_HPP_INCLUDED_
#define BOOST_WINAPI_HEAP_MEMORY_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#include <boost/winapi/detail/header.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if !defined( BOOST_USE_WINDOWS_H )
#undef HeapAlloc
extern "C" {
#if BOOST_WINAPI_PARTITION_DESKTOP_SYSTEM
BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
GetProcessHeaps(boost::winapi::DWORD_ NumberOfHeaps, boost::winapi::PHANDLE_ ProcessHeaps);
#endif // BOOST_WINAPI_PARTITION_DESKTOP_SYSTEM
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
GetProcessHeap(BOOST_WINAPI_DETAIL_VOID);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::LPVOID_ BOOST_WINAPI_WINAPI_CC
HeapAlloc(
boost::winapi::HANDLE_ hHeap,
boost::winapi::DWORD_ dwFlags,
boost::winapi::SIZE_T_ dwBytes);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
HeapFree(
boost::winapi::HANDLE_ hHeap,
boost::winapi::DWORD_ dwFlags,
boost::winapi::LPVOID_ lpMem);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::LPVOID_ BOOST_WINAPI_WINAPI_CC
HeapReAlloc(
boost::winapi::HANDLE_ hHeap,
boost::winapi::DWORD_ dwFlags,
boost::winapi::LPVOID_ lpMem,
boost::winapi::SIZE_T_ dwBytes);
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::HANDLE_ BOOST_WINAPI_WINAPI_CC
HeapCreate(
boost::winapi::DWORD_ flOptions,
boost::winapi::SIZE_T_ dwInitialSize,
boost::winapi::SIZE_T_ dwMaximumSize);
BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
HeapDestroy(boost::winapi::HANDLE_ hHeap);
#endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
} // extern "C"
#endif // !defined( BOOST_USE_WINDOWS_H )
namespace boost {
namespace winapi {
#if BOOST_WINAPI_PARTITION_DESKTOP_SYSTEM
using ::GetProcessHeaps;
#endif
using ::GetProcessHeap;
using ::HeapAlloc;
using ::HeapFree;
using ::HeapReAlloc;
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
using ::HeapCreate;
using ::HeapDestroy;
#endif
}
}
#include <boost/winapi/detail/footer.hpp>
#endif // BOOST_WINAPI_HEAP_MEMORY_HPP_INCLUDED_

Some files were not shown because too many files have changed in this diff Show More