[futurebasic] More R6 Carbon File Basics?

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

From: Douglas Stemen <dstemen@...>
Date: Tue, 26 Mar 2002 13:01:28 -0500
I use one file to control access to other files in a file sharing
environment. I use toolbox routines to create, open, and close this file.

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&)

I have spent several hours reviewing the reference manual and examples but
am not clear on the correct syntax for manipulating this file.

Can someone give me some direction on the correct toolbox commands to do
this? 

Also, can someone explain what FN FBWDToPBWD(parameterblock) does?

Thanks,

Doug Stemen