code_app/modules/base/HGDll.h

35 lines
800 B
C

#ifndef __HGDLL_H__
#define __HGDLL_H__
#include "HGDef.h"
#include "HGBaseErr.h"
HG_DECLARE_HANDLE(HGDll);
/* 加载DLL
* 参数:
* 1) fileName: in, dll/so文件路径, 可以是绝对路径或相对路径
* 2) dll: out, DLL句柄
* 说明:
* 1) 在windows系统上, fileName需要是GBK编码
* 2) 在linux系统上, fileName需要是UTF8编码
*/
HGEXPORT HGResult HGAPI HGBase_CreateDll(const HGChar* fileName, HGDll* dll);
/* 销毁DLL
* 参数:
* 1) dll: in, DLL句柄
* 说明:
*/
HGEXPORT HGResult HGAPI HGBase_DestroyDll(HGDll dll);
/* 查找函数地址
* 参数:
* 1) dll: in, DLL句柄
* 2) symbol: in, 函数名
* 3) func: out, 函数地址
* 说明:
*/
HGEXPORT HGResult HGAPI HGBase_GetDllProcAddress(HGDll dll, const HGChar* symbol, HGPointer* func);
#endif /* __HGDLL_H__ */