Speed Limits cause EInvalidCast('Invalid class typecase')

Giganews Newsgroups
Subject: Speed Limits cause EInvalidCast('Invalid class typecase')
Posted by:  ron (rrroo…@yahoo.com.au)
Date: Thu, 06 Nov 2003


I am using Indy 9.0.14 in Builder 6.  I am building a FTP client and have
attached a Throttle IO handler to the Ftp client object and then chained this to
an IO Socket handler.  I have set up the BPS to limit the amount of traffic.
When I run the application, I get the EInvalidCast('Invalid class typecase')
exception.  The call stack looks as follows:

7C4EA4E1 C:\WINNT\system32\kernel32.dll
00474C25 Idftp::TIdFTP::InternalGet
0052BEDC System::ErrorAt(ErrorCode=????, ErrorAddr=????)
0047490D Idftp::TIdFTP::List        <- indy code
00405686 TFormFTP::FTP_Exists(....})    <- my code

and appears to occur as a result of IOHandler initialisation.

I have read some previous posts and it appears to me that I'm doing things
right.  Any ideas?



PS I have previously posted this message to the .tcp but got no response, maybe
this group is more approipriate.