GetLastError.hpp 691 B

12345678910111213141516171819202122232425262728293031
  1. // GetLastError.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_GETLASTERROR_HPP
  6. #define BOOST_DETAIL_WINAPI_GETLASTERROR_HPP
  7. #include <boost/detail/winapi/basic_types.hpp>
  8. #ifdef BOOST_HAS_PRAGMA_ONCE
  9. #pragma once
  10. #endif
  11. namespace boost {
  12. namespace detail {
  13. namespace winapi {
  14. #if defined( BOOST_USE_WINDOWS_H )
  15. using ::GetLastError;
  16. #else
  17. extern "C" __declspec(dllimport) DWORD_ WINAPI
  18. GetLastError();
  19. #endif
  20. }
  21. }
  22. }
  23. #endif // BOOST_DETAIL_WINAPI_GETLASTERROR_HPP