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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dc6ab937143a5e6f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-26 01:39:00 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!tar-atanamir.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: HELP: Send command to the Windows prompt from Ada procedure Date: Thu, 26 Feb 2004 10:48:45 +0100 Message-ID: References: NNTP-Posting-Host: tar-atanamir.cbb-automation.de (212.79.194.116) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1077788338 53513083 I 212.79.194.116 ([77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:5831 Date: 2004-02-26T10:48:45+01:00 List-Id: On Wed, 25 Feb 2004 17:48:54 +0100, "Lele" wrote: >does anyone show me the simplest way to perform a windows system call using >Ada ? There are Win32 bindings for that. If you have a compiler for Windows you probably have them. Even if some of API are not listed there it is usually quite easy to call them manually using pragma Import. For example: with Interfaces.C; with Win32.WinDef; use Win32.WinDef; with Win32.WinNT; use Win32.WinNT; function LoadImage (Instance : HINSTANCE; ...) return HANDLE; pragma Import (StdCall, LoadImage, "LoadImageA"); >I've to call a batch file from my not-professional Ada procedure, or I've to >send command to the windows prompt (command.com) . How can I do that? Generally the same way as you would do it in C or Basic. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de