Win32Ada is an Ada 95 binding for Windows. (Click here to stop reading and go to download). Release 3.0 works with the Microsoft Win32 Application Programming Interface available on Windows NT and Windows 95. Its major features are:
Win32Ada has been tested on Intel 486 and Pentium platforms using Windows NT 3.5, Windows NT 3.51, Windows 95, and the following Ada compilers:
Intermetrics (now Sofcheck) Academic AdaMagic
Most testing was done on a Micron 90 MHz Pentium PC running Windows 95.
At the time of Win32Ada release 3.0 (September 30, 1996) GNAT 3.08W is still an experimental compiler not yet released by ACT. Win32Ada was compiled with this version of GNAT and the build files were modified to work with this version of GNAT, but the sample programs could not be linked and executed.
A PC with an Intel 486 or Pentium or Pentium Pro running Windows NT or Windows 95 is needed.
An Ada compiler for Intel and Windows 95/NT is needed, see the above list for the compilers we have used to test Win32Ada.
To use Win32Ada with one of the Thomson/Aonix or Intermetrics compilers, no other compiler prodct is needed.
To use Win32Ada with GNAT 3.08W we think no other compiler product is needed.
To use Win32Ada with GNAT 3.04A the Microsoft Win32 SDK (Software Developer's Kit), which comes with membership in The Microsoft Developer Network, is needed. In addition, some C runtime libraries like those available with Microsoft Visual C++, are needed.
To uncompress the files in Win32Ada an UNZIP utility is needed. UNZIP is available many places, for example Info-ZIP.
Downloading and building Win32Ada takes about 60megabytes of disk space. Building the binding and sample programs takes around an hour on a 90 MHz Pentium. Here are the steps:
MD5 win32ada.zipshould print
d372a54a070e6a6ffa37560c68391d43. Here is a MS-DOS executable MD5 , and a Sun executable MD5 .
By default Win32Ada is installed in the directory \win32ada, and the rest of these instructions assume that it was installed there.
To build Win32Ada with one of the Thomson/Aonix/Intermetrics compilers:
To build Win32Ada with one of the GNAT compilers:
The help file \win32ada\win32ada.hlp can be double-clicked, bringing up help for the binding. This help file contains a lot of information on its own, and contains hyperlinks to the Microsoft Win32 API help. The first time you follow one of these hyperlinks it may work, or you may be prompted to browse your disk for the appropriate Microsoft help file.
Win32Ada now has been split into two sections. The Win32 section (138 packages) has no dependencies on Microsoft Visual C++ or any other C or C++ compiler. The CRT section (CRT is an abbreviation for C runtime), comprising the 38 Win32.CRT.* packages, does depend on a set of C runtime libraries like those that come with Microsoft or GNU or another C compiler for Windows.
In release 3.0 of Win32Ada, the packages that depended on the C runtime have been fully separated from the packages that just depend on the Win32 interface.
If you want to use the CRT binding to the C runtime, you can compile some or all of the Win32.CRT.* files, and link with a C library from Microsoft or GNU or another source.
Win32Ada is based on a version of the Microsoft Win32 API headers which is getting old.
Many subprograms in the binding have anonymous access parameters, such as
function GetMessage(lpMsg : access MSG; hWnd : Win32.Windef.HWND; wMsgFilterMin: Win32.UINT; wMsgFilterMax: Win32.UINT) return Win32.BOOL
The lpMsg parameter really should be PMSG, a named pointer type that points to MSG. The difference is that you can't call GetMessage and pass the value null.
To get around this, if you really need to pass null, redeclare GetMessage with a parameter of type PMSG.
In recent months there has been a vigorous discussion about whether the various HANDLE types in Win32Ada should be subtypes, or derived types. They were subtypes in version 2.0 and have been left subtypes in version 3.0. The advantage of changing to derived types would be early error detection of certain kinds of errors; the disadvantage would be that the original Microsoft Win32 API is really not designed to be strongly typed and adding strong typing to handles would force programmers to make unnecessary type conversions all over their code.
-- WIN32ADA AND ANY ASSOCIATED DOCUMENTATION IS PROVIDED "AS IS" WITHOUT -- WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT -- LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR -- A PARTICULAR PURPOSE. The user assumes the entire risk as to the accuracy -- and the use of this file. WIN32ADA may be used only by licensees of -- Microsoft Corporation's WIN32 Software Development Kit in accordance with -- the terms of the licensee's End-User License Agreement for Microsoft -- Software for the WIN32 Development Kit. -- -- Copyright (c) Intermetrics, Inc. 1995 (now AverStar) -- Portions (c) 1985-1994 Microsoft Corporation with permission. -- Microsoft is a registered trademark and Windows and Windows NT are -- trademarks of Microsoft Corporation.
Development of Win32Ada was funded by the Ada Joint Program Office.
Win32Ada was developed jointly by Intermetrics (now AverStar) and Labtek.
Thanks to the people at Aonix for help and support.
Thanks to the GNAT team at ACT for helping with testing this release and for providing early releases of the GNAT compiler.
AverStar, Inc. will serve as the clearinghouse for improvements and bug fixes to Win32Ada. LabTek also offers consulting services for GNAT on Windows and for Win32Ada.
Some quite interesting Ada 95 Windows test programs are included in the SAMPLES directory. More are needed. If you write an interesting sample program that exercises a new part of the Win32 API in Ada, and you want to share that sample with other Ada programmers, please send it to the address below.
Please send comments and sample programs to:S. Tucker Taft
Last updated June 22, 1999.