type
TRegisterMenuEvent = procedure(sProcedureName: PChar; pfProcedureClickEvent: Pointer); stdcall;
TInvoke = procedure(lpszInBuffer: PChar; lpszOutBuffer: PChar); stdcall;下面好象有没有这两个过程的定义.
TRegisterMenuEvent = procedure(sProcedureName: PChar; pfProcedureClickEvent: Pointer); stdcall;
TInvoke = procedure(lpszInBuffer: PChar; lpszOutBuffer: PChar); stdcall;下面好象有没有这两个过程的定义.
可能是用傳遞其指針, 所以, 不是很明顯
var
fn : PVFN;
hm : HMODULE;
begin
hm := LoadLibrary('test.dll');
fn := GetProcAddress(hm, 'Function1');
fn(2);
FreeLibrary(hm);
end;
就需要这样写了,意思为调用这个函数类型
LoadLibrary读取DLL
GetProcAddress获得地址指针
FreeLibrary释放对象