Article View: borland.public.cppbuilder.nativeapi
Article #11653Re: CoInitializeEx
From: nicolasr
Date: Wed, 28 Jan 2004 02:12
Date: Wed, 28 Jan 2004 02:12
20 lines
1886 bytes
1886 bytes
thanks Remy, thanks Vladimir for your help. I was wondering why the CoInitializeEx call fails even when I place my component on a blank project. After looking at the pascal files that you mentioned it seems like the VCL initializes COM whenever I include one of the COM headers. The pascal initialization blocks seem to be executed when Application->Initialize is called. I tried setting the CoInitFlags in the test projects WinMain before this call and the error is gone. The problem is, however, that I'm writing a component and I think that I don't have access to the users WinMain. So I think that the only option is to tell the user that he need initialize COM for multi-threading himself. Thanks Vladimir for your WMI code. I will definitely come back and ask here because of compatibility issues with WMI... thanks again, Nick
Technical Details
Message-ID:
<40171ad2$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4012ffb1$1@newsgroups.borland.com> <40150765$1@newsgroups.borland.com> <40155c5b@newsgroups.borland.com> <4016278c$2@newsgroups.borland.com> <4016bfc8$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,415206d9c16e00b1 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-01-27 18:39:53 PST From: "nicolasr" <nicolasrNOSPAMATSIGNgmx.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <4012ffb1$1@newsgroups.borland.com> <40150765$1@newsgroups.borland.com> <40155c5b@newsgroups.borland.com> <4016278c$2@newsgroups.borland.com> <4016bfc8$1@newsgroups.borland.com> Subject: Re: CoInitializeEx Date: Wed, 28 Jan 2004 03:12:45 +0100 Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 80.133.180.34 Message-ID: <40171ad2$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1075256018 80.133.180.34 (27 Jan 2004 18:13:38 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail