handles.hpp 833 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // memory.hpp --------------------------------------------------------------//
  2. // Copyright 2010 Vicente J. Botet Escriba
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // See http://www.boost.org/LICENSE_1_0.txt
  5. #ifndef BOOST_DETAIL_WINAPI_HANDLES_HPP
  6. #define BOOST_DETAIL_WINAPI_HANDLES_HPP
  7. #include <boost/detail/winapi/basic_types.hpp>
  8. #ifdef BOOST_HAS_PRAGMA_ONCE
  9. #pragma once
  10. #endif
  11. namespace boost
  12. {
  13. namespace detail
  14. {
  15. namespace winapi
  16. {
  17. #if defined( BOOST_USE_WINDOWS_H )
  18. using ::CloseHandle;
  19. using ::DuplicateHandle;
  20. #else
  21. extern "C" {
  22. __declspec(dllimport) int __stdcall
  23. CloseHandle(void*);
  24. __declspec(dllimport) int __stdcall
  25. DuplicateHandle(void*,void*,void*,void**,unsigned long,int,unsigned long);
  26. }
  27. #endif
  28. }
  29. }
  30. }
  31. #endif // BOOST_DETAIL_WINAPI_HANDLES_HPP