Link to home
Start Free TrialLog in
Avatar of Monroe406
Monroe406

asked on

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

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?
Avatar of developmentguru
developmentguru
Flag of United States of America image

Show me the command line text please.  When I see that I should be able to help.
Avatar of Monroe406
Monroe406

ASKER

>> Show me the command line text please.

I had the command line version in my original message:

hh.exe -mapID 5 help.chm
ASKER CERTIFIED SOLUTION
Avatar of wavget
wavget
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
'hh.exe' should be PChar('hh.exe')