comp.lang.ada
 help / color / mirror / Atom feed
From: John McCabe <john@nospam.assen.demon.co.uk.nospam>
Subject: Re: Having a problem building with win32ada
Date: Tue, 09 Mar 2010 21:37:15 +0000
Date: 2010-03-09T21:37:15+00:00	[thread overview]
Message-ID: <vafdp5lur3vgd7i8eh0r7575dfqv319pmd@4ax.com> (raw)
In-Reply-To: 75cdp5pg8qba95j4bdopp4e8gq5jd67u1i@4ax.com

John McCabe <john@nospam.assen.demon.co.uk.nospam> wrote:

Couple of corrections....

1) I've put Unchecked_Conversion where it should be
Unchecked_Deallocation. Replace:

>   procedure Free is new
>      Ada.Unchecked_Conversion(Win32.Mmsystem.LPMIDIINCAPS,
>                               Win32.Mmsystem.MIDIINCAPS);
>   procedure Free is new
>      Ada.Unchecked_Conversion(Win32.Mmsystem.LPMIDIOUTCAPS,
>                               Win32.Mmsystem.MIDIOUTCAPS);

With

   procedure Free is new
      Ada.Unchecked_Deallocation(Win32.Mmsystem.MIDIINCAPS,
                                 Win32.Mmsystem.LPMIDIINCAPS);

   procedure Free is new
      Ada.Unchecked_Deallocation(Win32.Mmsystem.MIDIOUTCAPS,
                                 Win32.Mmsystem.LPMIDIOUTCAPS);


2) In face, the replacing with aliased Win32.Mmsystem.MIDIINCAPS etc
and use of Unchecked_Access DOESN'T WORK. It stops the file open from
failing, but the calls to midiIn/OutGetDevCaps return MMRESULT value
11 whish is Invalid Parameter.

Ah well.

I've done some more searching, and it looks to me like basically the
Win32Ada binding that AdaCore are allowing people to download are a
minimum of 11 years old. Apparently the last intermetrics version
(3.0) was released in 1999. The win32-mmsystem.ads has an Intermetrics
copyright date of 1995.

This is rather unfortunate. I'd hope this would be very useful for
what I wanted to do but, to be honest, it looks like the idea is
doomed as I really don't want to have to re-create a whole set of
Win32 Ada bindings based on the existing MinGW versions of these files
(that also appear to be out of date compared to the definitions of the
types you can find on Microsoft's website).

Disappointing.
John



  reply	other threads:[~2010-03-09 21:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-05 11:41 Having a problem building with win32ada John McCabe
2010-03-05 13:12 ` Dmitry A. Kazakov
2010-03-05 14:03   ` John McCabe
2010-03-05 14:27     ` John McCabe
2010-03-05 15:41       ` J-P. Rosen
2010-03-05 16:13         ` John McCabe
2010-03-05 20:24       ` Simon Wright
2010-03-08 11:30         ` John McCabe
2010-03-08 11:52           ` Dmitry A. Kazakov
2010-03-08 12:28             ` John McCabe
2010-03-05 14:35     ` John McCabe
2010-03-05 15:13 ` Gautier write-only
2010-03-09 21:00 ` John McCabe
2010-03-09 21:37   ` John McCabe [this message]
2010-03-10  2:32     ` tmoran
2010-03-10  8:05   ` John McCabe
replies disabled

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