Article View: borland.public.cppbuilder.nativeapi
Article #11766CoInitializeEx
From: nicolasr
Date: Sat, 24 Jan 2004 23:28
Date: Sat, 24 Jan 2004 23:28
19 lines
1428 bytes
1428 bytes
Hi, I'm writing a vcl component that needs to initialize COM for multi-threading to talk to WMI. I call CoInitializeEx in its constructor like this (only at runtime, though!) CoInitializeEx(0, COINIT_MULTITHREADED); When I use a simple test project, drag the component on the blank form and run it I get this error: RPC_E_CHANGED_MODE with message string "Cannot change thread mode after it is set" Why? I used a blank project and I don't assume that COM is initialized by default? thanks for any idea, Nick
Technical Details
Message-ID:
<4012ffb1$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!logbridge.uoregon.edu!tethys.csu.net!news-hog.berkeley.edu!ucberkeley!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,415206d9c16e00b1,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-01-24 15:38:06 PST From: "nicolasr" <nicolasrNOSPAMATSIGNgmx.net> Newsgroups: borland.public.cppbuilder.nativeapi Subject: CoInitializeEx Date: Sun, 25 Jan 2004 00:28:48 +0100 Lines: 21 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.176.138 Message-ID: <4012ffb1$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1074986929 80.133.176.138 (24 Jan 2004 15:28:49 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!logbridge.uoregon.edu!tethys.csu.net!news-hog.berkeley.edu!ucberkeley!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail