Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link COM: Uninitalizing COM objects 2 2004-01-18 -- Andy Ireland Newsgroups: softvelocity.public.clarion6
Hi Carl,
> When I looked an the CComInitter Destruct method it does not appear to call
> CoUNinit if S_False was returned for the CoInit.
It's a bug then.
> Also does CoInit really need to be called per thread? MSDN clearly says it
> does, but the book "Inside COM" says per Process.
Yes. This however highlights the inconsistences of various sources and may
accout for the CoInit bug whether from a book or some source saying it
really didn't matter. Remeber this code was originally written a long time
ago now. But it is per thread. You will get an error if not inited on each
thread when you come to use an interface. You also must marshal interfaces
across threads unless the default proxy stub does it for you. The proxy stub
should in most cases but not in all.
Regards
Andy
Today is November 23, 2024, 2:23 am This article has been viewed 35385 times.
|
|