beginTh:=LoadLibrary('ZLDS200_TCP_DLL.dll'); {装载DLL}if Th>0 thentryTp:=GetProcAddress(Th,PChar('ZLDS200Connect'));if Tp<>nil thenbeginTf:=TIntFunc(Tp);IntToStr(Tf(620)); {调用ZLDS200Connect函数}endelseShowMessage('ZLDS200Connect函数没有找到');finallyFreeLibrary(Th); {释放DLL}endelseShowMessage('ZLDS200_TCP_DLL.dll没有找到');end;
3 回答
呼啦一阵风
TA贡献1802条经验 获得超6个赞
begin
Th:=LoadLibrary('ZLDS200_TCP_DLL.dll'); {装载DLL}
if Th>0 then
begin
try
Tp:=GetProcAddress(Th,PChar('ZLDS200Connect'));
if Tp<>nil then
begin
Tf:=TIntFunc(Tp);
IntToStr(Tf(620)); {调用ZLDS200Connect函数}
end
else
ShowMessage('ZLDS200Connect函数没有找到');
finally
FreeLibrary(Th); {释放DLL}
end;
end
else
ShowMessage('ZLDS200_TCP_DLL.dll没有找到');
end;
添加回答
举报
0/150
提交
取消