[futurebasic] Re: [FB] working with resources in Carbon

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

From: Derek Smith <derek@...>
Date: Mon, 11 Mar 2002 16:48:29 -1000
On Monday, March 11, 2002, at 04:12 PM, MoorePrint@... wrote:

> This doesn't seem to work in Carbon, but fine in standard basic. How 
> do I
> change this for Carbon?
>
> LOCAL FN updateStr
> '-------------------------------------
> DIM res3hnl&,oldRefNum%,resfile%
>
> oldRefNum%=FN CURRESFILE

Change this line:

> resfile%=USR OPENRFPERM("customers",volRefNum%,_fsRdPerm)

To something like this:

#if carbonlib
   Dim fsSpec as FsSpec
   MyError = Fn FBMakeFSSpec(FileVol,0,fsName$,@fsSpec)
   refNum = fn FSpOpenResFile(MWfsSpec,_fsRdWrPerm)
#else
   refNum = Fn OpenRFPerm(fsName$,FileVol,_fsRdWrPerm)
#endif

Bit me when I fired up some old code.

-D