Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!mentor.cc.purdue.edu!j.cc.purdue.edu!aib From: aib@j.cc.purdue.edu (coleman) Newsgroups: comp.sys.mac.programmer Subject: help with sublaunching Message-ID: <9410@j.cc.purdue.edu> Date: 1 May 89 15:16:18 GMT Reply-To: aib@j.cc.purdue.edu (coleman) Distribution: usa Organization: Purdue University Lines: 50 a HELP !! I am having major problems with sublaunching. Everytime I try it, I get a system beep, but it exits from there without returning an error code. This was copied mostly from tech note # 126. Any help would be greatly appreciated. Source is as follows : typedef struct LaunchStruct { char *pfName; /* pointer to the name of launchee */ short int param; char LC[2]; /*extended parameters:*/ long int extBlockLen; /*number of bytes in extension == 6*/ short int fFlags; /*Finder file info flags (see below)*/ long int launchFlags; /*bit 31,30==1 for sublaunch, others reserved*/ } *pLaunchStruct; pascal OSErr LaunchIt( pLnch) /* < 0 means error */ pLaunchStruct pLnch ; { asm { MOVE.L (A7)+,A0 _Launch MOVE.W D0,(A7) ; since it MAY return */ } } OSErr DoLaunch(line) char *line ; { struct LaunchStruct myLaunch; OSErr err; /*Set up the launch parameters*/ myLaunch.pfName = line; /*pointer to our fileName*/ myLaunch.param = 0; /*we don't want alternate screen myLaunch.LC[0] = 'L'; myLaunch.LC[1] = 'C'; myLaunch.extBlockLen = 6; /*length of param. block past this long word*/ /*copy flags; set bit 6 of low byte to 1 for RO access:*/ /* gmc myLaunch.fFlags = 32;*/ /*from _GetCatInfo*/ myLaunch.launchFlags = 0xC0000000; /*set BOTH hi bits for a sublaunch */ err = LaunchIt(&myLaunch); /* call _Launch */ if (err) { printf("error = %d", err) ; } }