动态调用:
type
TChangCode=function (p1:类型;p2:类型):返回值类型;stdcall;
var
LHandle:THandle;
ChangCode:TChangCode;
LHandle := LoadLibrary('code.dll');
try
if LHandle = 0 then
showmessage('Unable to Load DLL');
@ChangCode=GetProcAddress(LHandle,'ChangCode');
if not (@ChangCode=nil) then
begin
//调用该函数,与其它函数调用方法相同
end;
finally
FreeLibrary(LHandle);
end;