johnsone@uxh.cso.uiuc.edu (Erik A. Johnson) (01/28/91)
I have an extra 4 bytes being sent to a subroutine in THINK C (4.0)! (see code portion, below) For some reason, when the program gets into the MyGetEvent subroutine, it only works if I put a dummy long (4-byte) variable at the beginning, otherwise the other variables (event mask, event pointer, and mouse RgnHandle) are incorrect, off by the 4-byte offset. Any ideas? (Oh, I'm using an SE/30 8meg, various INITs, etc.) Thanks in advance. E-mail responses. Thanks. Erik A. Johnson, Graduate Student \ Internet: johnsone@uxh.cso.uiuc.edu Aeronautical & Astronautical Engineering \ University of Illinois at Urbana-Champaign \ AmericaOnline: ErikAJ +----------------------------------------------------------------------- |EventRecord gTheEvent; |RgnHandle theMouseRgnH; |Boolean is_WaitNextEvent_Implemented; | |main() | { . | . | . | theMouseRgnH = NewRgn(); | MyGetEvent( (int)everyEvent, &_gTheEvent, _theMouseRgnH ); | . | . | . | } | |/**************** My Get Event ******************/ |MyGetEvent( dummy, theEventMask, theEventP, mouseRgnH ) |long dummy; |int theEventMask; |EventRecord *theEventP; |RgnHandle mouseRgnH; | { | if (is_WaitNextEvent_Implemented) | WaitNextEvent( theEventMask, theEventP, 0L, mouseRgnH ); | else | { SystemTask(); | GetNextEvent( theEventMask, theEventP ); | } | } +-----------------------------------------------------------------------