1 /* 2 * Copyright 2016 Klemens D. Morgenstern 3 * 4 * Distributed under the Boost Software License, Version 1.0. 5 * See http://www.boost.org/LICENSE_1_0.txt 6 */ 7 8 #ifndef BOOST_WINAPI_HANDLE_INFO_HPP_INCLUDED_ 9 #define BOOST_WINAPI_HANDLE_INFO_HPP_INCLUDED_ 10 11 #include <boost/winapi/basic_types.hpp> 12 13 #ifdef BOOST_HAS_PRAGMA_ONCE 14 #pragma once 15 #endif 16 17 #if BOOST_WINAPI_PARTITION_DESKTOP 18 19 #include <boost/winapi/detail/header.hpp> 20 21 #if !defined( BOOST_USE_WINDOWS_H ) 22 extern "C" { 23 24 BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC 25 GetHandleInformation( 26 boost::winapi::HANDLE_ hObject, 27 boost::winapi::LPDWORD_ lpdwFlags); 28 29 BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC 30 SetHandleInformation( 31 boost::winapi::HANDLE_ hObject, 32 boost::winapi::DWORD_ dwMask, 33 boost::winapi::DWORD_ dwFlags); 34 35 } // extern "C" 36 #endif 37 38 namespace boost { 39 namespace winapi { 40 41 using ::GetHandleInformation; 42 using ::SetHandleInformation; 43 44 #if defined( BOOST_USE_WINDOWS_H ) 45 46 BOOST_CONSTEXPR_OR_CONST DWORD_ HANDLE_FLAG_INHERIT_ = HANDLE_FLAG_INHERIT; 47 BOOST_CONSTEXPR_OR_CONST DWORD_ HANDLE_FLAG_PROTECT_FROM_CLOSE_ = HANDLE_FLAG_PROTECT_FROM_CLOSE; 48 49 #else 50 51 BOOST_CONSTEXPR_OR_CONST DWORD_ HANDLE_FLAG_INHERIT_ = 0x1; 52 BOOST_CONSTEXPR_OR_CONST DWORD_ HANDLE_FLAG_PROTECT_FROM_CLOSE_ = 0x2; 53 54 #endif 55 56 } 57 } 58 59 #include <boost/winapi/detail/footer.hpp> 60 61 #endif // BOOST_WINAPI_PARTITION_DESKTOP 62 63 #endif // BOOST_WINAPI_HANDLE_INFO_HPP_INCLUDED_ 64