]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/winapi/include/boost/detail/winapi/handles.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / winapi / include / boost / detail / winapi / handles.hpp
CommitLineData
7c673cae
FG
1// handles.hpp --------------------------------------------------------------//
2
3// Copyright 2010 Vicente J. Botet Escriba
4// Copyright 2015 Andrey Semashev
5
6// Distributed under the Boost Software License, Version 1.0.
7// See http://www.boost.org/LICENSE_1_0.txt
8
9
10#ifndef BOOST_DETAIL_WINAPI_HANDLES_HPP
11#define BOOST_DETAIL_WINAPI_HANDLES_HPP
12
13#include <boost/detail/winapi/basic_types.hpp>
14
15#ifdef BOOST_HAS_PRAGMA_ONCE
16#pragma once
17#endif
18
19#if !defined( BOOST_USE_WINDOWS_H )
20extern "C" {
21BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
22CloseHandle(boost::detail::winapi::HANDLE_ handle);
23
24BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
25DuplicateHandle(
26 boost::detail::winapi::HANDLE_ hSourceProcessHandle,
27 boost::detail::winapi::HANDLE_ hSourceHandle,
28 boost::detail::winapi::HANDLE_ hTargetProcessHandle,
29 boost::detail::winapi::HANDLE_* lpTargetHandle,
30 boost::detail::winapi::DWORD_ dwDesiredAccess,
31 boost::detail::winapi::BOOL_ bInheritHandle,
32 boost::detail::winapi::DWORD_ dwOptions);
33}
34
35#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN10
36BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
37CompareObjectHandles(
38 boost::detail::winapi::HANDLE_ hFirstObjectHandle,
39 boost::detail::winapi::HANDLE_ hSecondObjectHandle);
40#endif
41
42#endif
43
44namespace boost {
45namespace detail {
46namespace winapi {
47
48using ::CloseHandle;
49using ::DuplicateHandle;
50
51#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN10
52using ::CompareObjectHandles;
53#endif
54
55#if defined( BOOST_USE_WINDOWS_H )
56const DWORD_ DUPLICATE_CLOSE_SOURCE_ = DUPLICATE_CLOSE_SOURCE;
57const DWORD_ DUPLICATE_SAME_ACCESS_ = DUPLICATE_SAME_ACCESS;
58const HANDLE_ INVALID_HANDLE_VALUE_ = INVALID_HANDLE_VALUE;
59#else
60const DWORD_ DUPLICATE_CLOSE_SOURCE_ = 1;
61const DWORD_ DUPLICATE_SAME_ACCESS_ = 2;
62const HANDLE_ INVALID_HANDLE_VALUE_ = (HANDLE_)(-1);
63#endif
64
65const DWORD_ duplicate_close_source = DUPLICATE_CLOSE_SOURCE_;
66const DWORD_ duplicate_same_access = DUPLICATE_SAME_ACCESS_;
67const HANDLE_ invalid_handle_value = INVALID_HANDLE_VALUE_;
68
69}
70}
71}
72
73#endif // BOOST_DETAIL_WINAPI_HANDLES_HPP