🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3640

Re: TCppWebBrowser + LOCAL_SYSTEM account

#3640
From: Alan Bellingham
Date: Wed, 10 May 2006 16:47
23 lines
1900 bytes
"Mike Collins" <its@TheBottomOfThePost.com> wrote:

>Hi Remy, I've replaced the catch (...) with a catch (Exception &exception) 
>and temporarily modified the code so i can see and use the WlxMessageBox to 
>display the exception message.  The message that I'm getting is
>
>    "CoInitialize has not been called"
>
>don't know if this enlightens the situation at all.  Any ideas?

Helpful error message, that. It's the one that has most frequently
caused me to go "Duh!". It's basically complaining that you're using a
COM component (whether explicitly or not) with the COM subsystem not
running.

To solve it, put a call to CoInitialize() before your failing call.

Actually, I'd suggest putting the call to CoInitialize() in your
startup, and a balancing one to CoUninitialize() in your shutdown. 

Alan Bellingham
-- 
ACCU Conference 2007 - venue to be determined.
Technical Details
Message-ID: <g26462dc5l9t2u33i2d6c9lmnoe4u1uvm2@4ax.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4460d27d$1@newsgroups.borland.com> <4460ea6b@newsgroups.borland.com> <446216ce$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d67fc4a2c4ab8bd3
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Alan Bellingham <alanb@episys.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: TCppWebBrowser + LOCAL_SYSTEM account
Date: Wed, 10 May 2006 17:47:08 +0100
Reply-To: alanb@episys.com
Message-ID: <g26462dc5l9t2u33i2d6c9lmnoe4u1uvm2@4ax.com>
References: <4460d27d$1@newsgroups.borland.com> <4460ea6b@newsgroups.borland.com> <446216ce$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 193.129.251.253
X-Trace: newsgroups.borland.com 1147279627 193.129.251.253 (10 May 2006 09:47:07 -0700)
Lines: 23
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail