Article View: borland.public.cppbuilder.nativeapi
Article #161Re: CreateProcessAsUserW and quoted path names...
From: Bob Gonder
Date: Wed, 18 Jun 2008 16:45
Date: Wed, 18 Jun 2008 16:45
18 lines
1830 bytes
1830 bytes
Mike Collins wrote:
>Just out of interest, the docs say that you can use the = operator with a
>WideString and assign an AnsiString this way, based on this, would the
>following be a better solution (this is purly out of interest):
>
> WideString wzAppName = AnsiString("\"" + Utils->getControlCentreExePath() +
>"\"");
Take a moment to reflect on your "addition"...
What does "ABC" + "DEF" + "GHI" mean?
Is there some magic somewhere that adds char* to char* ?
See my previous conversion, and collaps it if you wish.
Now, if instead of returning an ansi string,
getControlCentreExePath()returned AnsiString, then you could do
WideString wzAppName = "\"" + Utils->getControlCentreExePath() + "\"";
Technical Details
Message-ID:
<vuci545kudqi1h7tgn2ntmr2sgv9d9l254@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4855474a@newsgroups.borland.com> <k3ua5456b2t0gdnnc6mmdm0hn2tm6crosr@4ax.com> <4855889d@newsgroups.borland.com> <933b54p734ss9a639pu6qs5t34ripfgl77@4ax.com> <4858d2af@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a169c88c9ed98680 X-Google-Attributes: gid10cc67,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <none@nowhere.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: CreateProcessAsUserW and quoted path names... Date: Wed, 18 Jun 2008 09:45:30 -0700 Message-ID: <vuci545kudqi1h7tgn2ntmr2sgv9d9l254@4ax.com> References: <4855474a@newsgroups.borland.com> <k3ua5456b2t0gdnnc6mmdm0hn2tm6crosr@4ax.com> <4855889d@newsgroups.borland.com> <933b54p734ss9a639pu6qs5t34ripfgl77@4ax.com> <4858d2af@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.77.144.12 X-Trace: newsgroups.borland.com 1213807525 67.77.144.12 (18 Jun 2008 09:45:25 -0700) Lines: 20 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail X-Original-Bytes: 1674