Z
zurich
Unregistered / Unconfirmed
GUEST, unregistred user!
我抄了一个ping程序,当然这东西很老套。也同样出了一个很老套的问题,我没办法解决。
每次运行:
try
IcmpSendEcho(hICMP, FIPAddress, pReqData, Length(MyString),@IPOpt, pIPE, BufferSize, FTimeOut);
if pReqData^ = pIPE^.Options.OptionsData^ then
Memo1.Lines.Add(PChar(PingEdit.Text) + ' ' + IntToStr(pIPE^.DataSize) + ' ' +IntToStr(pIPE^.RTT));
except
Memo1.Lines.Add('Cant resolve host!');
FreeMem(pRevData);
FreeMem(pIPE);
Exit;
end;
运行到 if pReqData^ = pIPE^.Options.OptionsData^ then 时出现异常提示:
project project1.exe raised exception class EAccessviolation with message
'access violation at address 0048530E in module 'project1.exe',read of address
00000000,'process stopped, Use step or run to continue!
请大家看一下,分数不太多。谁给了我最直接的答案,给出原因,100分给谁。
每次运行:
try
IcmpSendEcho(hICMP, FIPAddress, pReqData, Length(MyString),@IPOpt, pIPE, BufferSize, FTimeOut);
if pReqData^ = pIPE^.Options.OptionsData^ then
Memo1.Lines.Add(PChar(PingEdit.Text) + ' ' + IntToStr(pIPE^.DataSize) + ' ' +IntToStr(pIPE^.RTT));
except
Memo1.Lines.Add('Cant resolve host!');
FreeMem(pRevData);
FreeMem(pIPE);
Exit;
end;
运行到 if pReqData^ = pIPE^.Options.OptionsData^ then 时出现异常提示:
project project1.exe raised exception class EAccessviolation with message
'access violation at address 0048530E in module 'project1.exe',read of address
00000000,'process stopped, Use step or run to continue!
请大家看一下,分数不太多。谁给了我最直接的答案,给出原因,100分给谁。