code_app/modules/base/HGDll.h

35 lines
800 B
C
Raw Permalink Normal View History

2022-05-03 10:25:52 +00:00
#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__ */