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

how to create a thread in COM

22 views
Skip to first unread message

shash

unread,
Dec 19, 2009, 6:10:44 AM12/19/09
to
hi,

I need to create thread within my COM object. But I'm not sure that
how can implement the multi-threaded environment properly. Can I just
create windows thread and do whatever processing I needed ?

I have heard about COM threads , but I'm not sure whether it is
talking about normal thread.

Please provide me a clarrification

Igor Tandetnik

unread,
Dec 19, 2009, 9:43:17 AM12/19/09
to
shash wrote:
> I need to create thread within my COM object. But I'm not sure that
> how can implement the multi-threaded environment properly. Can I just
> create windows thread and do whatever processing I needed ?

Yes. Unless you want to make COM calls or fire COM events from that thread. Then it becomes trickier. See

http://support.microsoft.com/kb/150777
http://vcfaq.mvps.org/com/1.htm

> I have heard about COM threads , but I'm not sure whether it is
> talking about normal thread.

I'm not familiar with the term "COM thread", but my guess would be the author meant a regular thread (there is only one kind, the kind created by CreateThread API) that initialized COM and is performing COM-related work.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925

0 new messages