fixed typos in messsage processing
fixed loadlibrary code fixed game identification in chatter
This commit is contained in:
parent
a27d39a394
commit
730ce7a1d4
5 changed files with 32 additions and 29 deletions
|
|
@ -137,18 +137,21 @@ public:
|
|||
return m_ptr;
|
||||
}
|
||||
|
||||
inline void *GetFuncAddr (const char *function)
|
||||
template <typename R> R GetFuncAddr (const char *function)
|
||||
{
|
||||
if (!IsLoaded ())
|
||||
return NULL;
|
||||
|
||||
#ifdef PLATFORM_WIN32
|
||||
return reinterpret_cast <void *> (GetProcAddress (static_cast <HMODULE> (m_ptr), function));
|
||||
return reinterpret_cast <R> (GetProcAddress (static_cast <HMODULE> (m_ptr), function));
|
||||
#else
|
||||
return reinterpret_cast <void *> (dlsym (m_ptr, function));
|
||||
return reinterpret_cast <R> (dlsym (m_ptr, function));
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void *GetHandle (void)
|
||||
template <typename R> R GetHandle (void)
|
||||
{
|
||||
return m_ptr;
|
||||
return (R) m_ptr;
|
||||
}
|
||||
|
||||
inline bool IsLoaded (void) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue