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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dc26cb3eab4e2683,start X-Google-Attributes: gid103376,public From: "R.C.M. de Rooij" Subject: Calling Win32 API functions with GNAT 3.09 on Windows 95 Date: 1997/02/13 Message-ID: <01bc19a3$bc70bd40$549da182@dutibp.twi.tudelft.nl>#1/1 X-Deja-AN: 218490963 Organization: Technische Universiteit Delft Newsgroups: comp.lang.ada Date: 1997-02-13T00:00:00+00:00 List-Id: 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.