Article View: borland.public.cppbuilder.nativeapi
Article #146Re: CreateProcessAsUserW and quoted path names...
From: Bob Gonder
Date: Sun, 15 Jun 2008 22:22
Date: Sun, 15 Jun 2008 22:22
20 lines
1690 bytes
1690 bytes
Mike Collins wrote:
>getControlCentreExePath() returns an ansi string, it's just a getter...
Then you are using the wrong function.
you are passing an ansi string to a function expecting a widestring.
(WideString)("\""... doesn't magically convert ansi to wide. It just
lies to the compiler to keep it from properly telling you things.
WideString wzAppName = (WideString)("\""....
operator WideString= requires a WideString, AnsiString or char* on the right.
You are supplying none of those.
I think this should do it...
AnsiString asTemp = "\"" + Utils->getControlCentreExePath() + AnsiString("\"");
WideString wzAppName( asTemp );
See the paramter list for friend operator +
Technical Details
Message-ID:
<933b54p734ss9a639pu6qs5t34ripfgl77@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4855474a@newsgroups.borland.com> <k3ua5456b2t0gdnnc6mmdm0hn2tm6crosr@4ax.com> <4855889d@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: Sun, 15 Jun 2008 15:22:58 -0700 Message-ID: <933b54p734ss9a639pu6qs5t34ripfgl77@4ax.com> References: <4855474a@newsgroups.borland.com> <k3ua5456b2t0gdnnc6mmdm0hn2tm6crosr@4ax.com> <4855889d@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 1213568577 67.77.144.12 (15 Jun 2008 15:22:57 -0700) Lines: 23 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail