• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2010 Vicente J. Botet Escriba
3  * Copyright 2015 Andrey Semashev
4  * Copyright 2017 James E. King, III
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_WINAPI_WAIT_HPP_INCLUDED_
11 #define BOOST_WINAPI_WAIT_HPP_INCLUDED_
12 
13 #include <boost/winapi/basic_types.hpp>
14 #include <boost/winapi/wait_constants.hpp>
15 #include <boost/winapi/detail/header.hpp>
16 
17 #ifdef BOOST_HAS_PRAGMA_ONCE
18 #pragma once
19 #endif
20 
21 #if !defined( BOOST_USE_WINDOWS_H )
22 extern "C" {
23 
24 #if BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM
25 BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
26 WaitForSingleObjectEx(
27     boost::winapi::HANDLE_ hHandle,
28     boost::winapi::DWORD_ dwMilliseconds,
29     boost::winapi::BOOL_ bAlertable);
30 #endif
31 
32 #if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
33 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
34 BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
35 SignalObjectAndWait(
36     boost::winapi::HANDLE_ hObjectToSignal,
37     boost::winapi::HANDLE_ hObjectToWaitOn,
38     boost::winapi::DWORD_ dwMilliseconds,
39     boost::winapi::BOOL_ bAlertable);
40 #endif
41 #endif
42 
43 #if BOOST_WINAPI_PARTITION_APP_SYSTEM
44 BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
45 WaitForSingleObject(
46     boost::winapi::HANDLE_ hHandle,
47     boost::winapi::DWORD_ dwMilliseconds);
48 
49 BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
50 WaitForMultipleObjects(
51     boost::winapi::DWORD_ nCount,
52     boost::winapi::HANDLE_ const* lpHandles,
53     boost::winapi::BOOL_ bWaitAll,
54     boost::winapi::DWORD_ dwMilliseconds);
55 
56 BOOST_WINAPI_IMPORT boost::winapi::DWORD_ BOOST_WINAPI_WINAPI_CC
57 WaitForMultipleObjectsEx(
58     boost::winapi::DWORD_ nCount,
59     boost::winapi::HANDLE_ const* lpHandles,
60     boost::winapi::BOOL_ bWaitAll,
61     boost::winapi::DWORD_ dwMilliseconds,
62     boost::winapi::BOOL_ bAlertable);
63 #endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
64 
65 } // extern "C"
66 #endif
67 
68 namespace boost {
69 namespace winapi {
70 
71 #if BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM
72 using ::WaitForSingleObjectEx;
73 #endif
74 #if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
75 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_NT4
76 using ::SignalObjectAndWait;
77 #endif
78 #endif
79 
80 #if BOOST_WINAPI_PARTITION_APP_SYSTEM
81 using ::WaitForMultipleObjects;
82 using ::WaitForMultipleObjectsEx;
83 using ::WaitForSingleObject;
84 #endif
85 
86 }
87 }
88 
89 #include <boost/winapi/detail/footer.hpp>
90 
91 #endif // BOOST_WINAPI_WAIT_HPP_INCLUDED_
92