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 3 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.
My current code is correct so it's a left over bug from a long time ago.
There are quite a few bugs in the old code that were fixed years ago. My
current code is....
PWCOMIniter.Construct procedure
code
compile('_PWU_', _PWUtil_)
CoUninitialize()
CoFreeAllLibraries()
self.hr = CoInitializeEx(0, COINIT_MULTITHREADED)
_PWU_
omit('_PWU_', _PWUtil_)
self.hr = CoInitialize(0)
_PWU_
if self.hr = S_FALSE or self.hr = S_OK
self.hr = S_OK
self.fInitialised = true
end
PWCOMIniter.Destruct procedure
code
if self.fInitialised
CoUninitialize()
self.fInitialised = false
end
Regards
Andy
Today is November 21, 2024, 6:37 am This article has been viewed 35374 times. Google search has resulted in 5 hits on this article since January 25, 2004.
|
|