Re: CoInitializeEx and MTA
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Tue, 1 Jul 2008 00:53:55 -0400
"George" <George@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:165B66C4-BDD8-41E8-A94B-BA7B85800F34@xxxxxxxxxxxxx
There are per-thread resources, too. CoUninitialize in a thread frees
resources allocated for this thread when it leaves MTA apartment.
I am confused. In point 1 of the question, you think it is correct
that no resource is allocated from the 2nd call to CoInitializeEx.
I meant second call on the same thread. It either fails, or returns
S_FALSE and does nothing (except incrementing some internal counter).
Every thread that wants to use COM must call CoInitialize[Ex]. The first
such call (the first for the calling thread, not for the apartment or
for the process) returns S_OK and allocates per-thread resources.
--
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
.
- References:
- Re: CoInitializeEx and MTA
- From: Igor Tandetnik
- Re: CoInitializeEx and MTA
- Prev by Date: Re: pintf format specifier for scieintifc number format?
- Next by Date: memory keeps on increasing
- Previous by thread: Re: CoInitializeEx and MTA
- Next by thread: Re: CoInitializeEx and MTA
- Index(es):
Relevant Pages
|