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,7383ed55785a88c7,start X-Google-Attributes: gid103376,public From: "R.C.M. de Rooij" Subject: Calling Win32 API functions with Gnat 3.09 (Win32 version) Date: 1997/02/13 Message-ID: <01bc19a2$42ac0f60$549da182@dutibp.twi.tudelft.nl>#1/1 X-Deja-AN: 218497058 X-Nntp-Posting-Host: dutibp.twi.tudelft.nl Sender: news@student.twi.tudelft.nl Organization: Technische Universiteit Delft Newsgroups: comp.lang.ada Date: 1997-02-13T00:00:00+00:00 List-Id: 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.