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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7e1b1b0836bf8b48,start X-Google-Attributes: gid103376,public From: "SEV, AV Guest 2" Subject: API-timer... Date: 1999/07/27 Message-ID: <2461CF0DA7DBD211B07300805F921CBC0203768D@kuumex03.barco.com>#1/1 X-Deja-AN: 505723488 Sender: "SEV, AV Guest 2" Newsgroups: comp.lang.ada Date: 1999-07-27T00:00:00+00:00 List-Id: I would like to use an API-timer in my future projects... the following source compiles but the executable doesn't do what I want... Has anyone experience with this... ------------------------------------------------------------------------ --------------- with win32, win32.winbase, win32.winuser; with Ada.Unchecked_Conversion; with Text_IO; with System; package Test is Result : Win32.Uint; Val : String (1..80); Len : Integer; procedure Tik (a : integer); function Convert is new Ada.Unchecked_Conversion (Win32.LPVoid,Win32.WinUser.TIMERPROC); procedure Drop; end Test; package body Test is procedure Tik (a: integer) is Result : Win32.Bool; begin Result:=Win32.Winbase.beep(win32.ulong(a),500); end Tik; procedure Drop is begin Result:=Win32.Winuser.SetTimer(null,0,1000,Convert(Tik'address)); Text_IO.Get_Line(S.Val,S.Len); end Drop; end Test; with Test; procedure Main is begin Test.Drop; end Main; ------------------------------------------------------------------------ --------------