Article View: borland.public.cppbuilder.nativeapi
Article #9763ShellExecute funtion and parameter
From: Mario Sernicola
Date: Mon, 14 Jun 2004 19:14
Date: Mon, 14 Jun 2004 19:14
42 lines
2136 bytes
2136 bytes
Hi,
I use ShellExecute function in roder to launch various applications by code
HINSTANCE ShellExecute(
HWND hwnd, // handle to parent window
LPCTSTR lpOperation, // pointer to string that specifies operation to
perform
LPCTSTR lpFile, // pointer to filename or folder name string
LPCTSTR lpParameters, // pointer to string that specifies
executable-file parameters
LPCTSTR lpDirectory, // pointer to string that specifies default
directory
INT nShowCmd // whether file is shown when opened
);
this is a sample of my code
//--------------------------------------------------------------------------
-
AnsiString run = "application.exe" //value of string is a demo
AnsiString params = "/M /Z c:\temp\test.bmp" //values of
parameters are a demo
ShellExecute(Handle, "open", run.c_str(), params.c_str(),
ExtractFileDir(run).c_str(), SW_SHOW);
//--------------------------------------------------------------------------
-
all run properly if the dir of the object in params doesn't contain blank
char (of course)
How can I open (for example)
AnsiString params = "/M /Z c:\temp\this is a test.bmp" ???
Thanks
Mario Sernicola
Technical Details
Message-ID:
<40cdf920$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,8b302835aad6a46f,start X-Google-Attributes: gid10cc67,public Reply-To: "Mario Sernicola" <mariosernicola@nospam.libero.it> From: "Mario Sernicola" <mariosernicola@nospam.libero.it> Newsgroups: borland.public.cppbuilder.nativeapi Subject: ShellExecute funtion and parameter Date: Mon, 14 Jun 2004 21:14:53 +0200 Lines: 44 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: 80.181.138.214 Message-ID: <40cdf920$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1087240480 80.181.138.214 (14 Jun 2004 12:14:40 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail