[futurebasic] Re: [FB] How to convert FSSpec to working directory id

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2000 : Group Archive : Group : All Groups

From: George Beckman <gbeckman@...>
Date: Thu, 28 Dec 2000 19:58:50 -0800
This one works for me:

_myProcID = _"PGGP"  (put your apps id here)
'-------------------------------------------------
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 a FB II routine.  Some have noted that, but I have not heard that it
does not work.

-- 
Best Wishes,

George
mailto: gbeckman@...
http://www.pggp.com