Alain, >> why don't you use the more modern call fn FSOpenResFile? Mainly because I don't seem to have any docs for it. > >I meant, FSpOpenResFile. Here is a code that might work: > >LOCAL FN getFCOD > DIM Size&,OSErr%,Temp$,gCodeH& > DIM filetype$,oldRes%,appRes% > DIM fSpec AS FSSpec >//gFBAutoXrefUseTempMem = _zTrue > fileType = "APPL" > Temp$ = "Select a built FB application." > fSpec.parID = 0 > fSpec.name = FILES$(_fOpen,Filetype,Temp$,fSpec.vRefNum) > LONG IF fSpec.name > oldRes = FN CurResFile > appRes% = fn FSpOpenResFile(fSpec,_fsRdWrPerm) > UseResFile(appRes) > gCodeH& = fn GetIndResource(_"FCOD",1) > UseResFile(oldRes) > DetachResource(gCodeH&) > CloseResFile(appRes%) > END IF >END FN Thanks. I got it to work with openrfperm, but if I run into more difficulties, I'll keep your suggestion in reserve. Thanks again for your trouble. 0"0 =J= a y "