From: "Dmitry A. Kazakov" <dmitry@gandalf.atm.fh-luebeck.de>
Subject: Re: Another Win32 joystick problem.
Date: 1999/08/17
Date: 1999-08-17T09:19:08+00:00 [thread overview]
Message-ID: <37B92A6E.A4C8A480@gandalf.atm.fh-luebeck.de> (raw)
In-Reply-To: 7pamd6$eqk$1@bgtnsc03.worldnet.att.net
Josh Highley wrote:
> with ada.text_io;
> with win32.mmsystem;
>
> use ada.text_io;
> use win32.mmsystem;
>
> procedure joytest is
>
> pragma Linker_Options("-lwinmm");
>
> joystick_info : lpjoyinfo;
^^^^^^^^^^^^
This is a pointer to nothing (uninitialized) that you are passing to joyGetPos!
(should be aliased JoyInfo).
>
> joyID : win32.UINT := 0;
> result : mmresult;
>
> package mmresult_io is new ada.text_io.modular_io(mmresult);
> package UINT_io is new ada.text_io.modular_io(Win32.UINT);
> use mmresult_io;
> use UINT_io;
>
> begin
> -- function joyGetPos(
> -- uJoyID: Win32.UINT;
> -- lpji : LPJOYINFO)
> -- return MMRESULT;
> result := joyGetPos(joyID , joystick_info); -- returning error 11
^^^^^^^^^^^
joystick_info'unchecked_access
Regards,
Dmitry
prev parent reply other threads:[~1999-08-17 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-16 0:00 Another Win32 joystick problem Josh Highley
1999-08-17 0:00 ` Dmitry A. Kazakov [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox