delphi提示错误[Error] Unit1.pas(81): Declaration expected but end of file found
beginTh:=LoadLibrary('ZLDS200_TCP_DLL.dll');{装载DLL}ifTh>0thentryTp:=GetProcAddress(Th...
begin
Th:=LoadLibrary('ZLDS200_TCP_DLL.dll'); {装载DLL}
if Th>0 then
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
else
ShowMessage('ZLDS200_TCP_DLL.dll没有找到');
end;
好像begin,end不匹配!怎么看不出呢》?? 展开
Th:=LoadLibrary('ZLDS200_TCP_DLL.dll'); {装载DLL}
if Th>0 then
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
else
ShowMessage('ZLDS200_TCP_DLL.dll没有找到');
end;
好像begin,end不匹配!怎么看不出呢》?? 展开
3个回答
展开全部
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;
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;
更多追问追答
追问
还是一样的错误额,[Error] Unit1.pas(64): Declaration expected but end of file found。不知道什么原因。
追答
你能把64行标注出来吗?
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-11-27
展开全部
在 FreeLibrary(Th); {释放DLL}
再加个end试试
再加个end试试
追问
试了,加了end的那里会报错!
追答
感觉a470198949写的没错,如果不行,再看看其他地方了,一步一步来......
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询