comp.lang.ada
 help / color / mirror / Atom feed
* Calling Win32 API functions with Gnat 3.09 (Win32 version)
@ 1997-02-13  0:00 R.C.M. de Rooij
  0 siblings, 0 replies; only message in thread
From: R.C.M. de Rooij @ 1997-02-13  0:00 UTC (permalink / raw)



Hi.

On my Windows 95 machine, using the Win32 version of GNAT 3.09, the
following program compiles and runs correctly.

   with Interfaces, Ada.Text_IO;

   procedure Strange_Behaviour is

      function GetVersion return Interfaces.Unsigned_32;
      pragma Import(Stdcall, GetVersion, "GetVersion");

   begin
      -- delay 100.0;
      Ada.Text_IO.Put_Line(Interfaces.Unsigned_32'Image(GetVersion));
   end Strange_Behaviour;

However, when I uncomment the 'delay' statement, it still compiles fine,
but when I run it, the program gives a segmentation fault (or the
equivalent), *before* the delay statment is executed.  Is this because I'm
doing anything wrong, or is this version of GNAT is not compatible with
Windows 95, or is it a bug?

Regards,

Ruud.
-- 
Ruud de Rooij                         |  The thirteenth day of the month is
r.c.m.derooij@twi.tudelft.nl          |  more often Friday than any other
http://sepc.twi.tudelft.nl/~derooij/  |  day of the week.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-02-13  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-02-13  0:00 Calling Win32 API functions with Gnat 3.09 (Win32 version) R.C.M. de Rooij

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