Hello,
>
> my D2007 ICS V5 based app uses SmtpCli in a COM server DLL which was
> formerly a real exe file with a mostly hidden VCL main form and thus a
> separate message loop. But the SmtpCli was bound to its own thread via
> setting multithreaded to true and threaddetaching and threadattaching
> it to this secondary thread.
>
> Why don't you create the SmtpCli object in TThread's Execute method?
> No need to fiddle around with ThreadAttach/ThreadDetach.

Because I simply had placed the component on my datamodule which seems
easier at the time I did this. But I try to change it today if time permits.

> This architecture now seems to make problems after changing to a in
> process DLL and getting rid of that VCL mainform which was only used
> for debugging anyway.
>
> Has anybody any experience?
>
> No, not with SMTPCli in a DLL.
>
> I get errors like cannot detach from
> thread or attach to annother thread or so.
>
> That's the point, a window handle can only be deallocated in
> the context
> of the thread that created it.

Ok, but I think I already obeyed to this. Let's see what the dynamic
creation will bring. I suppose I don't need any thread attach/detach
then when I do it inside execute?

Greetings

Markus
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to