dynamiclibrary.h
来自「网络游戏通用架构, 这是基于boost和libevent写的一个程序」· C头文件 代码 · 共 44 行
H
44 行
#ifndef DYNAMICLIBRARY_H
#define DYNAMICLIBRARY_H
/*
The most codes here is from the ICE(www.zeroc.com). Thanks a lot. ;-)
*/
#ifndef _WIN32 #include <dlfcn.h>#else #include <windows.h>#endif
#include <stddef.h>
#include <string>
using namespace std;
#include "common.h"
class EXPORT DynamicLibrary
{
public:
DynamicLibrary();
~DynamicLibrary();
public:
bool load( const string& __filename );
void* getSymbol( const string& __name );
void unload(void);
const string& getError(void) const
{
return _err;
}
protected:
#ifdef _WIN32 HINSTANCE _hnd;#else void* _hnd;#endif
string _err;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?