comp.lang.ada
 help / color / mirror / Atom feed
* RE: run external .exe files within an ada program..
@ 2001-07-10 22:16 Beard, Frank
  0 siblings, 0 replies; 6+ messages in thread
From: Beard, Frank @ 2001-07-10 22:16 UTC (permalink / raw)
  To: 'comp.lang.ada@ada.eu.org'

Henrik,

Someone might have answered this already, but one of 
the simplest ways is to use Winexec.  As in:

   status :=
      Win32.Winbase.WinExec(lpCmdLine => To_Lpcstr("C:\MyDir\My.exe"),
                            uCmdShow  => Win32.Winuser.SW_HIDE);

This is superceded by the more complicated CreateProcess API, but
it will probably never go away, at least not for a long time.

John English also sent an example of another API which works as well.

  Win32.WinDef.HINSTANCE hInst :=
    Win32.ShellAPI.ShellExecute(
      System.Null_Address,                      -- no parent window
      To_LPCSTR("open" & ASCII.NUL),            -- command
      To_LPCSTR("c:\MyDir\My.exe" & ASCII.NUL), -- file to open
      System.Null_Address,                      -- no parameters
      System.Null_Address,                      -- no default directory
      Win32.WinUser.SW_SHOWNORMAL               -- show window normally
    );

Hope this helps.

Frank

-----Original Message-----
From: mollberg@hotmail.com [mailto:mollberg@hotmail.com]
Sent: Wednesday, July 04, 2001 10:09 AM
To: comp.lang.ada@ada.eu.org
Subject: run external .exe files within an ada program..


how do I do that? does it exist any counterparts to "system" in perl or
something?

(I'm developing in win32 environment)

regards,
Henrik
_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org
http://ada.eu.org/mailman/listinfo/comp.lang.ada



^ permalink raw reply	[flat|nested] 6+ messages in thread
* run external .exe files within an ada program..
@ 2001-07-04 14:09 Henrik Möllberg
  2001-07-04 14:46 ` Alfred Hilscher
  2001-07-04 15:59 ` David C. Hoos, Sr.
  0 siblings, 2 replies; 6+ messages in thread
From: Henrik Möllberg @ 2001-07-04 14:09 UTC (permalink / raw)


how do I do that? does it exist any counterparts to "system" in perl or something?

(I'm developing in win32 environment)

regards,
Henrik



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-07-10 22:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-10 22:16 run external .exe files within an ada program Beard, Frank
  -- strict thread matches above, loose matches on Subject: below --
2001-07-04 14:09 Henrik Möllberg
2001-07-04 14:46 ` Alfred Hilscher
2001-07-04 15:59 ` David C. Hoos, Sr.
2001-07-05 12:50   ` wzm
2001-07-05 13:30   ` Ted Dennison

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox