Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!purdue!bu-cs!mirror!francis From: francis@mirror.UUCP (Joe Francis) Newsgroups: comp.sys.mac.programmer Subject: Re: Parameter blocks (yech!) Message-ID: <32896@mirror.UUCP> Date: 14 Nov 89 23:13:39 GMT Organization: Mirror Systems. Cambridge, Mass. Lines: 23 In article <9730@zodiac.ADS.COM> jtn@zodiac.ADS.COM (John Nelson) writes: (some stuff deleted) >Specifically when I declare my parameter block pointer to be of type >parmBlkPtr, the LSC compiler complains that ioCompletion is not a >valid union or member. If I declare my parameter block pointer to be >of type fileParam, the element namePtr is suddenly not defined. > >Now on page 117 we see that yes indeed these elements are not defined >when you use these respective pointers... BUT there must be some way >to access both of these elements via the same parameter block pointer! >In fact this is what the documentation implies... that the first 8 >elements are included in all structures and varients of the structures. > In FileMgr.h *ParmBlkRec and ParamBlockRec are defined together as a union of the structs ioParam, fileParam, and volumeParam. So instead of ParmBlkPtr pbPtr; ... pbPtr->ioCompletion = 0L; you need: pbPtr->fileParam.ioCompletion = 0L; for example. I hope that helps!