• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 452
  • Last Modified:

icmp in Delphi6

I'm using icmp from Andreas Hörstemeier in Delphi6 and it will compile and run in the IDE but when I try to build the project I get the following error:


[Error] ICMP.PAS(532): Left side cannot be assigned to



 ticmp_sendblock(requestdata^).icmp_header.icmp_type := ICMP_ECHO;
    ticmp_sendblock(requestdata^).icmp_header.icmp_code := 0;
    ticmp_sendblock(requestdata^).icmp_header.icmp_cksum := 0;
    ticmp_sendblock(requestdata^).icmp_header.icmp_seq := f_packet_no;
    inc(f_packet_no);     {  LINE 532   }
    ticmp_sendblock(requestdata^).icmp_header.icmp_id := word(self);
    fillchar(ticmp_sendblock(requestdata^).data,f_blocksize,#$a7);
    ticmp_sendblock(requestdata^).time:=now_ms;
    ticmp_sendblock(requestdata^).icmp_header.icmp_cksum := ICMP_checksum(requestdata^,rq_size);
    whereto_len:=sizeof(whereto);



Is anyone using this VCL in version 6, If so what is the workaround.  I tried to change it but everything I try fails.


Thanks



0
alspivey
Asked:
alspivey
1 Solution
 
God_AresCommented:
imo f_packet_no is incresed by itself, you don't need to increase it manualy.

If you are only interested in pinging i have made it 2.
you may dl soucecode @
http://www.angelfire.com/ok/GODARES/downl.html
(sorry 4 the popups, free hosting..) and get scanner.zip
you will find pinging there. look into netkit.pas and icmpapi.pas.

hope this helps.
0
 
alspiveyAuthor Commented:
I'm not that is the original code
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now