comp.lang.ada
 help / color / mirror / Atom feed
* API-timer...
@ 1999-07-27  0:00 SEV, AV Guest 2
  1999-07-27  0:00 ` API-timer Martin C. Carlisle
  0 siblings, 1 reply; 2+ messages in thread
From: SEV, AV Guest 2 @ 1999-07-27  0:00 UTC (permalink / raw)


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;
------------------------------------------------------------------------
--------------





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-07-27  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-27  0:00 API-timer SEV, AV Guest 2
1999-07-27  0:00 ` API-timer Martin C. Carlisle

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