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,4324ae2d703ae7ff X-Google-Attributes: gid103376,public From: "Dmitry A. Kazakov" Subject: Re: Another Win32 joystick problem. Date: 1999/08/17 Message-ID: <37B92A6E.A4C8A480@gandalf.atm.fh-luebeck.de>#1/1 X-Deja-AN: 513724249 Content-Transfer-Encoding: 7bit References: <7pamd6$eqk$1@bgtnsc03.worldnet.att.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@de.uu.net Organization: Customer of UUNET Deutschland GmbH, Dortmund, Germany Mime-Version: 1.0 NNTP-Posting-Date: 17 Aug 1999 09:19:08 GMT Newsgroups: comp.lang.ada Date: 1999-08-17T09:19:08+00:00 List-Id: 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