Re: Can't use TComponent in thread object?



You mean thread := TMyThread.create(true);

Ah! Thanks. That fixes the exception but the thread doesn't seem to
go. Here's my code:

thread := TProgressThread.Create(true);
thread.HostAddress := _hostAddress;
thread.UserName := _userName;
thread.Password := _password;
thread.RemoteDirectory := _remoteDirectory;
thread.RemoteFile := _remoteFile;
thread.LocalDirectory := _localDirectory;
thread.Resume;

Shouldn't it execute on the Resume call? I create the thread suspended
so I can assign variables for the FTP class inside of TProgressThread.
In TProgressThread's Execute method, I start the FTP download. But
nothing is happening. The FTP works when I use it in the same Unit (no
multi threading). There must be some thing on the thread I missed to
get it going.

Thanks,
Brett

.



Relevant Pages

  • Re: System.Security.SecurityException was unhandled
    ... The exception gave you the CLSID. ... the first thing to check might be whether the COM server ... assembly actually has the permission in question. ... When I execute the application I received and error message. ...
    (microsoft.public.dotnet.security)
  • Re: collecting results in threading app
    ... but execute one at the time'. ... Could a Queue help me there? ... You can take a look at papyros, a small package I wrote for hiding ... # some exception was raised when executing this job ...
    (comp.lang.python)
  • Re: CLI Exception Handling
    ... the exception, but not on the same instruction that actually generated the ... functionality does exist in win32 SEH. ... handler executes all finally blocks that were lower on the stack have ... >> really can do is make a decision to continue searching or execute the ...
    (microsoft.public.dotnet.framework.clr)
  • exception using wmic
    ... I get an exception when I try to execute any command using wmic. ... SUCCESS: CoCreateInstance(CLSID_XSLTemplate, NULL, CLSCTX_SERVER, ...
    (microsoft.public.win32.programmer.wmi)
  • Re: CLI Exception Handling
    ... It is practically quite difficult to determine (in the handler block) from which IL instruction the exception was thrown. ... >> really can do is make a decision to continue searching or execute the ...
    (microsoft.public.dotnet.framework.clr)