Article View: borland.public.cppbuilder.nativeapi
Article #10345ShellExecute on LNK files
From: Marc
Date: Fri, 16 Apr 2004 19:41
Date: Fri, 16 Apr 2004 19:41
32 lines
1657 bytes
1657 bytes
Hi
Does anyone know why a ShellExecute does not work on LNK files
of OfficeXP and 2003. This works with most LNK files but not
office.
I get an Invalid Parameter error.
Thanks in advance for the help
Marc
PS:
Here is my code, maybe I am not seeing something obvious.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
SHELLEXECUTEINFO execinfox;
memset (&execinfox, 0, sizeof (execinfox)) ;
execinfox.cbSize = sizeof (execinfox) ;
execinfox.lpVerb = "open" ;
execinfox.lpDirectory = "C:\\Documents and Settings\\All Users\\Start Menu\\Programs\\Office XP";
execinfox.lpFile = "Microsoft Excel.lnk";
execinfox.lpParameters = "";
// Run the program.
if (! ShellExecuteEx (&execinfox))
{
ShowMessage ("Could not create process");
return ;
}
}
Technical Details
Message-ID:
<408036d4$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.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-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,7148159e8e963fa1,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-04-16 13:10:14 PST From: "Marc" <bukwheat@axess.com> Sender: "Marc" <bukwheat@axess.com> Reply-To: "Marc" <bukwheat@axess.com> Subject: ShellExecute on LNK files Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 138.11.254.204 X-Forwarded-For: unknown NNTP-Posting-Host: 207.105.83.66 Message-ID: <408036d4$1@newsgroups.borland.com> Date: 16 Apr 2004 12:41:08 -0700 X-Trace: newsgroups.borland.com 1082144468 207.105.83.66 (16 Apr 2004 12:41:08 -0700) Lines: 33 Path: arc1-ca.pugleaf.net!archiver1.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