Article View: borland.public.cppbuilder.nativeapi
Article #3646Re: TCppWebBrowser + LOCAL_SYSTEM account
From: Mike Collins
Date: Thu, 11 May 2006 00:53
Date: Thu, 11 May 2006 00:53
46 lines
2456 bytes
2456 bytes
Bingo..........
Thanks a million - thats exactly what i needed. Works perfectly now. I've
never had to make this call directly when i've used the TCppWebBrowser
before though.
Also, you might be able to point me in the right direction with regards to
best practices. I trying to work out the best place to place these two
calls CoInitialize() and CoUninitialize(). The for that I want to use the
TCppWebBroswer on is rearly called so I had thought of placing these calls
in the try... __finally statement, thus:
try
{
try
{
if (CoInitialize(NULL)==S_OK)
{
HelpOptDlg = new THelpOptDlg(Application->MainForm);
iRtn = HelpOptDlg->ShowModal();
}
else
// error...
}
catch (Exception &exception)
{
MessageBox(NULL, exception.Message.c_str(), "TCppWebBrowser
Exception", MB_OK|MB_ICONERROR|MB_TOPMOST);
}
}
__finally
{
delete HelpOptDlg;
HelpOptDlg = NULL;
CoUninitialize();
}
Do you think this is sutiable or is it better to call it "globally" when the
DLL first starts up i.e. in DLLMain?
Thanks again,
"Alan Bellingham" <alanb@episys.com> wrote in message
news:g26462dc5l9t2u33i2d6c9lmnoe4u1uvm2@4ax.com...
> "Mike Collins" <its@TheBottomOfThePost.com> wrote:
Technical Details
Message-ID:
<44628b1d$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4460d27d$1@newsgroups.borland.com> <4460ea6b@newsgroups.borland.com> <446216ce$1@newsgroups.borland.com> <g26462dc5l9t2u33i2d6c9lmnoe4u1uvm2@4ax.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: "Mike Collins" <its@TheBottomOfThePost.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4460d27d$1@newsgroups.borland.com> <4460ea6b@newsgroups.borland.com> <446216ce$1@newsgroups.borland.com> <g26462dc5l9t2u33i2d6c9lmnoe4u1uvm2@4ax.com> Subject: Re: TCppWebBrowser + LOCAL_SYSTEM account Date: Thu, 11 May 2006 01:53:50 +0100 Lines: 48 Organization: SDA Ltd X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.3790.2663 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2663 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 81.2.92.14 Message-ID: <44628b1d$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1147308829 81.2.92.14 (10 May 2006 17:53:49 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail