[futurebasic] Re: [FB] More R6 Carbon File Basics?

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2002 : Group Archive : Group : All Groups

From: Staz <staz@...>
Date: Tue, 26 Mar 2002 13:40:17 -0600
> 
> The last step in converting my program to Appearance Carbon is overcoming
> the compile errors associated with three toolbox commands.
> 
> I load these values into the parameterblock...
> 
> PBlk&.ioNamePtr&=FileName&'this is file name pointer
> PBlk&.ioVRefNum%=Vol%'this is volume reference number
> PBlk&.ioPermssn%=Perm%'if 3 then exclusive read/write permission
> PBlk&.ioPosMode%=_fsFromStart
> 
> FB3 Carbon compiler generates errors for these three commands
> ioErr% = FN OPEN(PBlk&)
> ioErr% = FN CREATE(PBlk&)
> ioErr%=FN FLUSHVOL(PBlk&)
> 
> This command does not create a compiler error
> ioErr%=FN CLOSE(PBlk&)


You did not say where you were getting the info to plug into these toolbox
calls. Is it from FILES$.

Any way you go, you will need to read the section named Appendix H: File
Spec Records and pay particular attention to the OS x vs OS 9 volRefNum
section and to FN GetRealVolAndDir(vRefNum%,parentID&)


-STAZ  ~)~