[futurebasic] Re: Volume Reference Numbers

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1997 : Group Archive : Group : All Groups

From: GBeckman@...
Date: Sat, 22 Nov 1997 16:01:03 -0500 (EST)
In a message dated 11/22/97 10:32:51 AM, Mike wrote:

>1)  What exactly is a volume reference number, how are they assigned, etc.
>2)  How can you get the vrefnum of a volume if you know it's name and/or
>    SCSI address?
>3)  How do you get the vrefnum of the startup disk?
>4)  How do vrefnums on shared disks work?
>5)  What's the answer to the ultimate question of life, the universe, and
>    everything?

That one I know.  42.

I would like to add to Mike's questions as I share much of his perplexity
about vrefnums.

6.  How can I resolve an alias  (PGs useAlias) and then find out what the
vrefNum of the new file (in my case often on a server) is?  UseAlias and the
tool box call resolve alias appear as if they are going to give you refnum,
but it ain't so.   I want to use it in Andy's example on the STAZ site:

DIM pBlock.128
DIM Noerr&
LOCAL FN SetFilesFolder(Vref%)
  pBlock.ioVRefNum% = Vref%
    & _CurDirStore , pBlock.ioDirID&
    pBlock.ioWDProcID&  = 0
    pBlock.ioWDVRefNum% = 0
    LONG IF FN GETWDINFO(@pBlock) = _NoErr
      % _SFSaveDisk , -pBlock.ioWDVRefNum%
    END IF
    NoErr&=FN FLUSHVOL(@pBlock)

  	The above fn allows my users to use the finder  (or an alias on the
desktop) to log onto a server, open a file and have the next open (or save of
a new document) from within my app. be set to the folder in which the file
just opened resides.   Trouble is, use alias gives -1, -2, etc. and those are
not the actual volRefNum.

Thanks in advance,

	George Beckman