From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a6b7a17511f0c0e0,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-10 15:17:25 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: "Beard, Frank" Newsgroups: comp.lang.ada Subject: RE: run external .exe files within an ada program.. Date: Tue, 10 Jul 2001 18:16:15 -0400 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: avanie.enst.fr 994803443 15260 137.194.161.2 (10 Jul 2001 22:17:23 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 10 Jul 2001 22:17:23 +0000 (UTC) To: "'comp.lang.ada@ada.eu.org'" Return-Path: X-Mailer: Internet Mail Service (5.5.2448.0) Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.4 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:9746 Date: 2001-07-10T18:16:15-04:00 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