Article View: borland.public.cppbuilder.nativeapi
Article #9765Re: ShellExecute funtion and parameter
From: Remy Lebeau (TeamB)
Date: Mon, 14 Jun 2004 20:22
Date: Mon, 14 Jun 2004 20:22
27 lines
1635 bytes
1635 bytes
"Mario Sernicola" <mariosernicola@nospam.libero.it> wrote in message
news:40cdf920$1@newsgroups.borland.com...
> I use ShellExecute function in roder to launch various applications by
code
If you are running an executable directly, then you should use
CreateProcess() instead. ShellExecute() is good for running things when you
don't know the actual executable to run.
> AnsiString params = "/M /Z c:\temp\test.bmp"
You need to double up your backslashes:
AnsiString params = "/M /Z c:\\temp\\test.bmp";
> How can I open (for example)
>
> AnsiString params = "/M /Z c:\temp\this is a test.bmp" ???
Wrap the filename in extra quotation marks:
AnsiString params = "/M /Z \"c:\\temp\\this is a test.bmp\"";
Gambit
Technical Details
Message-ID:
<40ce09f2$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40cdf920$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,8b302835aad6a46f X-Google-Attributes: gid10cc67,public From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <40cdf920$1@newsgroups.borland.com> Subject: Re: ShellExecute funtion and parameter Date: Mon, 14 Jun 2004 13:22:09 -0700 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.169.168.124 Message-ID: <40ce09f2$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1087244786 68.169.168.124 (14 Jun 2004 13:26:26 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail