In a message dated 1/19/99 3:48:42 AM, you wrote:
>richard@...
There are two routines in PG, HSF, called:
FN useAlias(resID,@fileSpecPtr&) USING gUseAlias&
FN makeAlias(fName$,fVRefNum,resID) USING gMakeAlias&
You will want to use Rick Brown's FN GetWDRefNum(volumeID, dirID&,OSErrAddr&)
_myProcID = _"PGGP" {Your apps signature}
'-------------------------------------------------
CLEAR LOCAL
DIM iopb.52
DIM OSErr
LOCAL FN GetWDRefNum(volumeID, dirID&,OSErrAddr&)
'Call as follows:
' wdRefNum = FN GetWDRefNum(volumeID, dirID&, @OSErr)
'Returns a Working Directory Reference Number, given a
'_true_ volume reference number (volumeID) and a directory
'ID (dirID&). The wdRefNum should be used in most places
'where FB documentation talks about a "volume reference number".
iopb.ioCompletion& = 0
iopb.ioNamePtr& = 0
iopb.ioVRefNum% = volumeID
iopb.ioWDDirID& = dirID&
iopb.ioWDProcID& = _myProcID
OSErr = FN OPENWD(@iopb)
POKE WORD OSErrAddr&, OSErr
END FN = iopb.ioVRefNum%
It is necessary as the volumeID (gvolRef) returned by FN useAlias does not
return the gvolRef that FB uses,
Here is a snip where I use these two, using 1003 as a resource ID:
CLEAR LOCAL
DIM osErr
DIM useAlias
DIM RECORD fsSpec
DIM fsVrefNum%
DIM fsParID&
DIM 63 fsName$
DIM END RECORD .fsSpec
DIM myFSSpec.fsSpec
DIM test
LOCAL FN SeeAboutAQuickOpen
osErr=FN useAlias(1003,myFSSpec)
LONG IF osErr=0
'PARENTID=myFSSpec.fsParID&
gFileVol=FN GetWDRefNum(myFSSpec.fsVrefNum%,myFSSpec.fsParID&,@OSErr)
<snip>
I hope this helps,
George