Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
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 :
Delphi
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;


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

Deplhi 7
Delphi
procedure TForm1.IdMappedPortTCP1Execute(AThread: TIdMappedPortThread);

end;


Embarcardero XE5
Delphi
procedure TForm1.IdMappedPortTCP1Execute(AContext: TIdContext);

end;


How to migrating my code to embarcardero XE5 ?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900