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