Advertisement

10.08.2007 at 08:55AM PDT, ID: 22879103
[x]
Attachment Details

Using ShellExecute with hh.exe and parameters (Delphi 3)

Asked by Monroe406 in Delphi Programming

Tags: delphi, shellexecute, parameters

I am having problems passing a .CHM file mapID value into a ShellExecute procedure.  Although the .CHM file launches, the context ID (mapID) page does not appear as the default.  Here's the code I'm using...

HelpNullFile: Array[0..128] of Char;
Instance: THandle;

begin

StrPCopy(HelpNullFile, ExtractFilePath(Application.ExeName) + 'help.chm');

Instance := ShellExecute(Application.Handle, 'open', HelpNullFile, PChar('-mapid 5'), nil, SW_SHOWNORMAL      );

end;

If I go to a DOS prompt, and type...

hh.exe -mapID 5 help.chm

... the correct page appears.  How can I get the correct page to appear when launched within Delphi 3?Start Free Trial
[+][-]10.08.2007 at 10:42AM PDT, ID: 20035615

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.08.2007 at 10:52AM PDT, ID: 20035684

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.08.2007 at 11:34AM PDT, ID: 20035954

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Delphi Programming
Tags: delphi, shellexecute, parameters
Sign Up Now!
Solution Provided By: wavget
Participating Experts: 2
Solution Grade: A
 
 
[+][-]10.08.2007 at 11:44AM PDT, ID: 20036024

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628