comp.lang.ada
 help / color / mirror / Atom feed
From: "Ekkehard Morgenstern" <ekkehard.morgenstern@onlinehome.de>
Subject: Re: [announcement] SYSAPI and SYSSVC for Windows
Date: Tue, 16 Dec 2003 01:56:20 +0100
Date: 2003-12-16T01:56:20+01:00	[thread overview]
Message-ID: <brll8t$ubo$1@online.de> (raw)
In-Reply-To: mailman.121.1071534347.31149.comp.lang.ada@ada-france.org


"Stephen Leake" <stephen_leake@acm.org> wrote:
> > SYSAPI is a package that interfaces directly to the Microsoft Windows API.
> 
> More precisely, to a _very_ small subset, dealing with synchronous and
> asynchronous file IO.

That statement of mine didn't elaborate on the scope of the package, 
I clarified that a couple of paragraphs later in my original post, to which
you also replied. Please read the entire post before you reply to anything.
This prevents things from being taken out of context. :)

> > I will also add windowing and graphics support (especially for DirectX 
> > Graphics, formerly known as DirectDraw and Direct 3D), and also audio and
> > video support.
> 
> Before you do that, you should look at the other Ada Windows bindings
> out there; see www.adapower.com. Rather than start another one,
> consider adding to one of those; that will be much more useful.

I've looked at a couple of other Ada Windows bindings, and didn't find them
satisfying, either because they're out of date, or because they're too 
expensive. I also explained this point in another post of this thread. :)

I'm not sure whether one of the existing packages can be extended.

Win32Ada looks like it needs a big update, and I don't have the time to do
an update of the entire binding. Also, since the GNAT DLL tools cannot link
to the new XP libraries (because of all-Stdcall exports), I decided to
abstract things with a DLL specifically written for GNAT.

> > For now, it contains only file services, namely 64-bit synchronous and
> > asynchronous services. I've seen that the GNAT libraries do not provide
> > those, and hence I had to write my own. I need 64-bit file I/O for a 
> > database project of my own (to allow for files bigger than 4 GB).
> 
> ok. Even better would be to add this to the GNAT Ada.Text_IO runtime!
> If you get it working, I bet ACT would be happy to include it in GNAT.

It would require file size and positioning APIs to support Large_Integers.

It would also require that there's a dynamic binding to some of the Windows
API functions. For example, GetFileSizeEx() is supported only on Windows
2000 and XP, while GetFileSize() is cumbersome to use but works with older
releases as well. 

I could modify GNAT if I get the source and a proper compilation environment
for it. :)

I suspect GNAT's Windows support hasn't been updated for a while, and 
somebody's got to do that. :)

> As for style, it is better to provide at least some comments in the
> spec saying what the functions do. Since you say these are not thin
> bindings, I have no idea what the various functions are for, beyond
> the English meaning of their names.

Yes, I've not added comments in some of the source files, I will when
I get around to it. :)

> You have constants CFALSE and CTRUE in the spec; that doesn't sound
> like a thick Ada binding, it sounds like a thin one. Almost every
> function returns a CBOOL, or has a CBOOL out parameter; what do they
> mean? A thick Ada binding should raise exceptions for errors (or one
> exception, with an error message string).

Perhaps you have misunderstood the concept. I've explained what the two
packages do already in my original post. 

SYSAPI is the layer that sits directly on top of the Windows API,
a thin layer or so, you might say.

SYSSVC provides the Ada-related services to call SYSAPI. You should also
take a look at the SYSSVC package and its spec file. I do throw exceptions
for failed I/O requests in SYSSVC. So that provides the thick layer, I guess.

But thanks for having a look at my code anyway! :)

Best wishes,
Ekkehard.




  reply	other threads:[~2003-12-16  0:56 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-15 14:18 [announcement] SYSAPI and SYSSVC for Windows Ekkehard Morgenstern
2003-12-15 15:10 ` Ekkehard Morgenstern
2003-12-15 17:10 ` Jeffrey Carter
2003-12-15 18:38   ` Ekkehard Morgenstern
2003-12-16  0:25     ` Stephen Leake
2003-12-16  0:56       ` Ekkehard Morgenstern [this message]
2003-12-16  2:47         ` Ludovic Brenta
2003-12-16 17:45           ` Ekkehard Morgenstern
2003-12-16 19:54             ` Ludovic Brenta
2003-12-16 22:09               ` Ekkehard Morgenstern
2003-12-17 15:24                 ` Ludovic Brenta
2003-12-17 23:23                   ` Ekkehard Morgenstern
2003-12-19 18:14                   ` Warren W. Gay VE3WWG
2003-12-20 12:37                     ` GNU/Linux distro wars (was: SYSAPI and SYSSVC for Windows) Ludovic Brenta
2003-12-22 17:48                       ` GNU/Linux distro wars Warren W. Gay VE3WWG
2003-12-22 19:33                         ` Duncan Sands
2003-12-22 23:25                         ` Ludovic Brenta
2003-12-23 10:18                           ` Samuel Tardieu
2003-12-16  5:36         ` [announcement] SYSAPI and SYSSVC for Windows tmoran
2003-12-16 17:30           ` Ekkehard Morgenstern
2003-12-15 20:44 ` David Marceau
2003-12-16  0:34   ` Ekkehard Morgenstern
2003-12-17 12:05 ` Dmitry A. Kazakov
2003-12-17 15:00   ` Ekkehard Morgenstern
2003-12-20 19:24 ` Ekkehard Morgenstern
  -- strict thread matches above, loose matches on Subject: below --
2003-12-17 19:17 amado.alves
2003-12-17 19:56 ` Georg Bauhaus
2003-12-18  9:08 ` Dmitry A. Kazakov
2003-12-18 12:14   ` Ekkehard Morgenstern
2003-12-18 13:31     ` Georg Bauhaus
2003-12-19 10:45       ` Ekkehard Morgenstern
2003-12-19 17:12         ` Georg Bauhaus
2003-12-19 17:22           ` Vinzent 'Gadget' Hoefler
2003-12-20  0:21           ` Ekkehard Morgenstern
2003-12-20  2:18             ` Georg Bauhaus
2003-12-20  4:40               ` Ekkehard Morgenstern
2003-12-21  3:45                 ` Georg Bauhaus
2003-12-18 14:32     ` Dmitry A. Kazakov
2003-12-19 11:11       ` Ekkehard Morgenstern
2003-12-19 15:15         ` Hyman Rosen
2003-12-19 15:50           ` Ekkehard Morgenstern
2003-12-19 16:48             ` Hyman Rosen
2003-12-19 16:57               ` Hyman Rosen
2003-12-20  1:17               ` Ekkehard Morgenstern
2003-12-21  2:19                 ` Hyman Rosen
2003-12-21 10:34                   ` Ekkehard Morgenstern
2003-12-22  9:02                     ` Hyman Rosen
2003-12-22 15:17                       ` Ekkehard Morgenstern
2003-12-22 15:08                     ` Hyman Rosen
2003-12-22 15:31                       ` Ekkehard Morgenstern
2003-12-22 16:35                         ` Ekkehard Morgenstern
2003-12-23  1:47                           ` Hyman Rosen
2003-12-23  8:40                             ` Ekkehard Morgenstern
2003-12-23  9:05                               ` Stephen Leake
2003-12-19 17:06         ` Dmitry A. Kazakov
2003-12-20  1:49           ` Ekkehard Morgenstern
2003-12-20 11:13             ` Dmitry A. Kazakov
2003-12-20 13:40               ` Ekkehard Morgenstern
2003-12-20 17:21                 ` Dmitry A. Kazakov
2003-12-20 19:52                   ` Ekkehard Morgenstern
2003-12-21  4:24                     ` Georg Bauhaus
2003-12-21 13:42                     ` Dmitry A. Kazakov
2003-12-21 15:48                       ` Ekkehard Morgenstern
2003-12-21 17:46                         ` Michal Morawski
2003-12-21 18:05                           ` Ekkehard Morgenstern
2003-12-22  0:50                             ` Robert I. Eachus
2003-12-23 23:02                       ` Robert A Duff
2003-12-24 11:20                         ` Dmitry A. Kazakov
2003-12-24 16:57                           ` Robert A Duff
2003-12-25 14:00                             ` Dmitry A. Kazakov
2003-12-28  1:49                       ` Dave Thompson
replies disabled

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