Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What COM apartment does an async WinInet thread get created in???

3 views
Skip to first unread message

Paul

unread,
Jun 15, 2005, 6:40:02 AM6/15/05
to
Hi,

I'm currently writing an application which combines COM and asynchronous
wininet. Does anybody know in which COM apartment an async wininet thread
gets created in? I'm assuming that the wininet thread has not initialised COM
using CoInitialiseEx, as you would if you created a particular thread
yourself, or in the main STA thread of your apllication during its
initialisation, but I don't know if this is significant or not.

I have a static C++ library which contains a class which handles async
wininet events, and in the handlers of these events, posts a message to a
hidden window, such that the wininet event can be processed within the
context of the main STA instead of the wininet thread. In the event handler
executing in the STA, an internal critical section (deep in atlcore.h)
variable is causing an access violation. I think this may be due to
re-entrancy that's occuring, but I'm not sure.

Any takers???

cheers,

P.


0 new messages