of each other. Please could you advise me the good way to do it?
Thanks and Regards.
Sure.... Reading more your description....
First, as you are aware COM is notorious for complex thread design
issues. No easy stuff. So the API must be stable and/or properly use
especially for threaded applications.
So the first quick question to first get out of the way is how are
initializing COM? For example:
CoInitialize(NULL)
CoInitializeEx(0, COINIT_MULTITHREADED);
This can play a role but it also depends on the COM object itself in
what it expects and allows. For example, you may have the call the
above at each THREAD entry.
Anyway, assuming you are using POP3 or maybe IMAP, these are
client/server designs so each session must be viewed as independent
transactions. i.e, a mail pickup thread does not conflict with another
session mail pickup, sound obvious. I know. :-)
But the key point is that this may also be a server limit or improper
state machine issue.
1) Server has connection limits as part of its MAIL AVS, BULK
SPAMMER prevention system. Since all your clients will
expose the same IP address to the server, it would be very
easy to impose limits that MOST mail servers offer to
operators.
2) The client is not properly handle server response codes.
A) Can put the transaction state machine in instable
state.
B) Server is aggressive and forces a disconnect for
misbehavior clients.
and so on.
So your COM client software and how your implement it, must be robust
enough to watch for server reply codes - all of them and act according
and not try to continue an errant state thus possibly causing an
faults in the COM object because it didn't know how to handle the
session request/response state machine.
Trust me on this. The #1 problem in these IETF based client/server
request/response protocols is someone not following the rules or bes=