From: "Beard, Frank" <beardf@spawar.navy.mil>
To: "'comp.lang.ada@ada.eu.org'" <comp.lang.ada@ada.eu.org>
Subject: RE: run external .exe files within an ada program..
Date: Tue, 10 Jul 2001 18:16:15 -0400
Date: 2001-07-10T18:16:15-04:00 [thread overview]
Message-ID: <mailman.994803431.7022.comp.lang.ada@ada.eu.org> (raw)
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
next reply other threads:[~2001-07-10 22:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-10 22:16 Beard, Frank [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-07-04 14:09 run external .exe files within an ada program 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox