comp.lang.ada
 help / color / mirror / Atom feed
* Calling Win32 API functions with GNAT 3.09 on Windows 95
@ 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.

The following program compiles and runs fine on my Windows 95 machine using
the NT version of GNAT 3.09.

   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, the program still compiles
fine, but when I run it, I get a segmentation fault.  Is this because I'm
doing something wrong (the pragma syntax?) or because this version of GNAT
isn't compatible with Windows 95 or is it just a bug?

Greetings,

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 on Windows 95 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