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,8a402d78988bdf2b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-15 16:57:02 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: "Ekkehard Morgenstern" Newsgroups: comp.lang.ada Subject: Re: [announcement] SYSAPI and SYSSVC for Windows Date: Tue, 16 Dec 2003 01:56:20 +0100 Organization: 1&1 Internet AG Message-ID: References: <%VlDb.5454$Pg1.1321@newsread1.news.pas.earthlink.net> NNTP-Posting-Host: p508c0fb1.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: online.de 1071536222 31096 80.140.15.177 (16 Dec 2003 00:57:02 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Tue, 16 Dec 2003 00:57:02 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:3478 Date: 2003-12-16T01:56:20+01:00 List-Id: "Stephen Leake" 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.