Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!cornell!batcomputer!pyramid!voder!apple!lsr From: lsr@apple.UUCP (Larry Rosenstein) Newsgroups: comp.sys.mac Subject: Re: Need Varification on fix made for PBHCreate Message-ID: <7048@apple.UUCP> Date: 17 Dec 87 22:13:25 GMT References: <458@psu-cs.UUCP> Reply-To: lsr@apple.UUCP (Larry Rosenstein) Organization: Advanced Technology Group, Apple Computer Lines: 45 In article <458@psu-cs.UUCP> smethers@psu-cs.UUCP (Paul Smethers) writes: > >Tech Note 102 says that if we don't set the ioFlVersNum to zero, this will >happen (it also says that this will only happen on MFS, yet we are using HFS). >Well, we did this and it still happened. So we tried setting ioFVersNum to >zero, and the problem went away. I think I understand the problem (we ran into a similar thing with MacApp). The key point is that the call PBHCreate (or any of the HFS-version calls) are exactly the same as the non-HFS versions (eg, PBCreate) if you are running on a machine without the HFS code or if you are dealing with an MFS volume. MFS volumes do store the file version number, but HFS volumes don't. So even if you specify all the field required by the PBHCreate call, the call might be treated as if it was a PBCreate call. If you look under PBCreate, you will notice that ioFVersNum is an input parameter. Therefore, to make sure your code works with MFS disks, you should always set ioFVersNum to 0. There is not problem with setting this field all the time. If the volume is an HFS volume, it will be ignored; otherwise it will be used. >/* Also, we did notice a note in Inside Mac IV (p. 120) that said that the >ioParam.ioVersNum should be zero. Does this carry on for ioFVersNum in the >fileParm variant? Furthermore, for PBCreate (not PBHCreate), ioFVersNum is >considered to be an input, but is left out for PBHCreate. Was it supposed >to be an input for PBHCreate also? */ You have to make sure either or both version number fields are set to 0, if the call requires it. Technically, PBHCreate doesn't use the version number, except that a PBHCreate called will execute as if it was a PBCreate call, if the volume is MFS. So in that sense, the Inside Mac should have included ioFVersNum in the description of PBHCreate. -- Larry Rosenstein Object Specialist Apple Computer AppleLink: Rosenstein1 UUCP: {sun, voder, nsc, mtxinu, dual}!apple!lsr CSNET: lsr@Apple.com