Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Mar : issue with TIdIcmpClient on VISTA
| Subject: | issue with TIdIcmpClient on VISTA |
| Posted by: | "Eugene V. Goldberg" (ego..@mts-nn.ru) |
| Date: | Fri, 21 Mar 2008 08:38:21 |
Hello,
I have a D5/Indy 10.0.76 code which makes use of TIdIcmpClient component...
Its pretty simple actually:
type
TPingThread = class(TThread)
private
FHandle: THandle;
FPing: TIdIcmpClient;
FHost: String;
FTimeout: Integer;
FReportErrors: Boolean;
protected
procedure Execute; override;
public
property Host: String write FHost;
property Timeout: Integer write FTimeout;
property ReportErrors: Boolean write FReportErrors;
constructor Create(OwnerHandle: THandle);
destructor Destroy; override;
end;
implementation
constructor TPingThread.Create(OwnerHandle: THandle);
begin
inherited Create(True);
FreeOnTerminate := True;
FHandle := OwnerHandle;
FPing := TIdIcmpClient.Create(nil);
end;
destructor TPingThread.Destroy;
begin
FPing.Free;
inherited Destroy
end;
procedure TPingThread.Execute;
begin
FPing.Host := FHost;
FPing.ReceiveTimeout := FTimeout;
while not Terminated do
begin
FPing.Ping;
if FPing.ReplyStatus.ReplyStatusType = rsTimeOut then
if FReportErrors then
SendMessage(FHandle, WM_PINGFAILED, 0, 0);
Sleep(5000);
end;
end;
The code works just fine on XP, but fails on VISTA. It AVs and here is
madExcept log:
Any ideas?
date/time : 2008-03-20 05:36
computer name : SHANE-XPS
user name : sdeets
operating system : Windows NT New build 6000
system language : English
system up time : 4 days 17 hours
program up time : 5 seconds
processors : 2x Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
physical memory : 944/2048 MB (free/total)
free disk space : (C:) 896.08 MB
display mode : 1600x1200, 32 bit
process id : $11d98
executable : InterOpRMS.exe
exec. date/time : 2008-03-20 05:36
version : 1.1.6.5
madExcept version : 2.7d beta 3
exception class : EIdSocketError
exception message : Socket Error # 11004.
thread $13c24 (TPingThread):
00735853 InterOpRMS.exe IdStackBSDBase 478 TIdStackBSDBase.RaiseSocketError
0073572d InterOpRMS.exe IdStackBSDBase 396
TIdStackBSDBase.RaiseLastSocketError
0073760a InterOpRMS.exe IdStackWindows 931 TIdStackWindows.HostByName
0073867a InterOpRMS.exe IdStack 556 TIdStack.ResolveHost
007398bc InterOpRMS.exe IdRawBase 212 TIdRawBase.Send
0073ad58 InterOpRMS.exe IdIcmpClient 196 TIdIcmpClient.SendEchoRequest
0073b072 InterOpRMS.exe IdIcmpClient 296 TIdIcmpClient.Ping
0073b38e InterOpRMS.exe uPingThread 50 TPingThread.Execute
0042bef6 InterOpRMS.exe madExcept HookedTThreadExecute
0043eeec InterOpRMS.exe Classes ThreadProc
00403fd4 InterOpRMS.exe System ThreadWrapper
0042be8b InterOpRMS.exe madExcept ThreadExceptFrame
76f73831 kernel32.dll BaseThreadInitThunk
7743a9bb ntdll.dll LdrInitializeThunk
>> created by main thread ($14450) at:
0073b2d2 InterOpRMS.exe uPingThread 32 TPingThread.Create