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-Thread: a07f3367d7,a632877f80f5be5d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!cyclone01.ams2.highwinds-media.com!news.highwinds-media.com!npeersf01.ams.highwinds-media.com!newsfe26.ams2.POSTED!7564ea0f!not-for-mail From: John McCabe Newsgroups: comp.lang.ada Subject: Re: Having a problem building with win32ada Message-ID: References: <0oq1p5dd88dhfkd1j868en04qa0hmcmj9v@4ax.com> <75cdp5pg8qba95j4bdopp4e8gq5jd67u1i@4ax.com> X-Newsreader: Forte Agent 2.0/32.652 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.176.146.77 X-Complaints-To: abuse@demon.net X-Trace: newsfe26.ams2 1268170636 80.176.146.77 (Tue, 09 Mar 2010 21:37:16 UTC) NNTP-Posting-Date: Tue, 09 Mar 2010 21:37:16 UTC Date: Tue, 09 Mar 2010 21:37:15 +0000 Xref: g2news1.google.com comp.lang.ada:9498 Date: 2010-03-09T21:37:15+00:00 List-Id: John McCabe 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