File indexing completed on 2025-01-18 09:53:47
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_WINAPI_GET_PROC_ADDRESS_HPP_INCLUDED_
0009 #define BOOST_WINAPI_GET_PROC_ADDRESS_HPP_INCLUDED_
0010
0011 #include <boost/winapi/basic_types.hpp>
0012
0013 #ifdef BOOST_HAS_PRAGMA_ONCE
0014 #pragma once
0015 #endif
0016
0017 #if BOOST_WINAPI_PARTITION_DESKTOP || BOOST_WINAPI_PARTITION_SYSTEM
0018
0019 #include <boost/winapi/detail/header.hpp>
0020
0021 #if !defined(BOOST_USE_WINDOWS_H)
0022 namespace boost { namespace winapi {
0023 #ifdef _WIN64
0024 typedef INT_PTR_ (BOOST_WINAPI_WINAPI_CC *FARPROC_)();
0025 typedef INT_PTR_ (BOOST_WINAPI_WINAPI_CC *NEARPROC_)();
0026 typedef INT_PTR_ (BOOST_WINAPI_WINAPI_CC *PROC_)();
0027 #else
0028 typedef int (BOOST_WINAPI_WINAPI_CC *FARPROC_)();
0029 typedef int (BOOST_WINAPI_WINAPI_CC *NEARPROC_)();
0030 typedef int (BOOST_WINAPI_WINAPI_CC *PROC_)();
0031 #endif
0032 }}
0033
0034 extern "C" {
0035 #if !defined(UNDER_CE)
0036 BOOST_WINAPI_IMPORT boost::winapi::FARPROC_ BOOST_WINAPI_WINAPI_CC
0037 GetProcAddress(boost::winapi::HMODULE_ hModule, boost::winapi::LPCSTR_ lpProcName);
0038 #else
0039
0040
0041 BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::FARPROC_ BOOST_WINAPI_WINAPI_CC
0042 GetProcAddressA(boost::winapi::HMODULE_ hModule, boost::winapi::LPCSTR_ lpProcName);
0043 BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::FARPROC_ BOOST_WINAPI_WINAPI_CC
0044 GetProcAddressW(boost::winapi::HMODULE_ hModule, boost::winapi::LPCWSTR_ lpProcName);
0045 #endif
0046 }
0047 #endif
0048
0049 namespace boost {
0050 namespace winapi {
0051
0052 #if defined(BOOST_USE_WINDOWS_H)
0053 typedef ::FARPROC FARPROC_;
0054 typedef ::NEARPROC NEARPROC_;
0055 typedef ::PROC PROC_;
0056 #endif
0057
0058 #if !defined(UNDER_CE)
0059
0060 using ::GetProcAddress;
0061 #else
0062 using ::GetProcAddressA;
0063 using ::GetProcAddressW;
0064 #endif
0065
0066 BOOST_FORCEINLINE FARPROC_ get_proc_address(HMODULE_ hModule, LPCSTR_ lpProcName)
0067 {
0068 #if !defined(UNDER_CE)
0069 return ::GetProcAddress(hModule, lpProcName);
0070 #else
0071 return ::GetProcAddressA(hModule, lpProcName);
0072 #endif
0073 }
0074
0075 }
0076 }
0077
0078 #include <boost/winapi/detail/footer.hpp>
0079
0080 #endif
0081 #endif