dll.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // dll.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_DLL_HPP
  6. #define BOOST_DETAIL_WINAPI_DLL_HPP
  7. #include <boost/detail/winapi/basic_types.hpp>
  8. #include <boost/detail/winapi/security.hpp>
  9. #ifdef BOOST_HAS_PRAGMA_ONCE
  10. #pragma once
  11. #endif
  12. namespace boost
  13. {
  14. namespace detail
  15. {
  16. namespace winapi
  17. {
  18. #if defined( BOOST_USE_WINDOWS_H )
  19. using ::LoadLibrary;
  20. using ::FreeLibrary;
  21. using ::GetProcAddress;
  22. using ::GetModuleHandleA;
  23. #else
  24. extern "C" {
  25. __declspec(dllimport) HMODULE_ __stdcall
  26. LoadLibrary(
  27. LPCTSTR_ lpFileName
  28. );
  29. __declspec(dllimport) BOOL_ __stdcall
  30. FreeLibrary(
  31. HMODULE_ hModule
  32. );
  33. __declspec(dllimport) FARPROC_ __stdcall
  34. GetProcAddress(
  35. HMODULE_ hModule,
  36. LPCSTR_ lpProcName
  37. );
  38. __declspec(dllimport) FARPROC_ __stdcall
  39. GetModuleHandleA(
  40. LPCSTR_ lpProcName
  41. );
  42. }
  43. #endif
  44. }
  45. }
  46. }
  47. #endif // BOOST_DETAIL_WINAPI_THREAD_HPP