comp.lang.ada
 help / color / mirror / Atom feed
From: Dmitry A. Kazakov <mailbox@dmitry-kazakov.de>
Subject: Re: HELP: Send command to the Windows prompt from Ada procedure
Date: Thu, 26 Feb 2004 10:48:45 +0100
Date: 2004-02-26T10:48:45+01:00	[thread overview]
Message-ID: <cjfr309fcse5kcp32chl2670k0utghg7e9@4ax.com> (raw)
In-Reply-To: c1ijm9$gmp$1@e3k.asi.ansaldo.it

On Wed, 25 Feb 2004 17:48:54 +0100, "Lele" <lele@libero.it> 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



  parent reply	other threads:[~2004-02-26  9:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-25 16:48 HELP: Send command to the Windows prompt from Ada procedure Lele
2004-02-25 18:20 ` David C. Hoos
2004-02-26  8:50   ` Lele
2004-02-25 18:27 ` HELP: " tmoran
2004-02-26  9:48 ` Dmitry A. Kazakov [this message]
2004-02-27 13:22 ` Stephen Leake
replies disabled

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