> I have some questions:
>
> I need DLL like 'AllInOne', how I must organize it? I have 2 problems:
>
> 1.There is one function entry point in DLL. How can I detect what
> OnRequestDone complit session and I can return from DLL funciton?
>
> 2.And how I must free memory under TPop3Cli after RqType==smtpQuit
> in OnRequestDone? (before returning from DLL)

The problem with a DLL is that you don't know the hosting application.
For ICS component to work properly, you need to have a working message pump. 
If the DLL is used from a GUI application, in the main thread, there is a 
message pump. If the DLL is called from a console mode application, it is 
likely that there is no such message pump.

So to have your DLL work in all situation, you should put all ICS stuff into 
a worker thread within the DLL and give this thread a message pump.

The function your DLL export would create the thread as paused, pass all 
parameters to the thread, resume the thread and wait until the thread 
terminate. The thread would handle everything.

ICS has a sample DLL to demonstrate this. Have a look at IcsDll1.dpr you'll 
find in your ics\internet directory. This sample use a simple socket, but 
there is no difference with POP3 you are interested in.

--
[EMAIL PROTECTED]
http://www.overbyte.be

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

Reply via email to