本文介绍了如何将代码delphi 7迁移到embarcardero XE5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在delphi 7中有一个代码,在Event OnExecute中有一个commponent indy ...

但是当我在Delphi XE5中实现时,我有一个错误。



代码事件OnExecute组件indy IditepedPortTCP在delphi 7中:

I have code in delphi 7 with a commponent indy in Event OnExecute...
but when I implemented in Delphi XE5,I have an error.

Code Event OnExecute component indy IdMappedPortTCP in delphi 7 :

procedure TForm1.IdMappedPortTCP1Execute(AThread: TIdMappedPortThread);
if (pos('CONNECT',athread.NetData)<>0) or (pos('GET',athread.NetData)<>0) or (pos('POST',athread.NetData)<>0) then
begin
Athread.NetData :=Athread.NetData+'GET http://www.rianekacahya.net/ HTTP/1.1'#13#10+'Connection: Keep-Alive'#13#10+'User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0'#13#10+'Host: '#13#10#13#10#13#10+Athread.NetData;
end;





事件OnExecute,不等于Delphi 7和Embarcardero XE5



Deplhi 7



Event OnExecute,not the equal between Delphi 7 and Embarcardero XE5

Deplhi 7

procedure TForm1.IdMappedPortTCP1Execute(AThread: TIdMappedPortThread);

end;





Embarcardero XE5



Embarcardero XE5

procedure TForm1.IdMappedPortTCP1Execute(AContext: TIdContext);

end;





如何迁移我的代码为embarcardero XE5?



How to migrating my code to embarcardero XE5 ?

推荐答案

这篇关于如何将代码delphi 7迁移到embarcardero XE5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 10:00