[futurebasic] Re: [FB] Disk Initialization

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 1999 : Group Archive : Group : All Groups

From: Rick Brown <rbrown@...>
Date: Wed, 16 Jun 1999 21:24:20 -0500

Sylvain Guillemette wrote:

> Hi,
>
> Can someone tell me what's wrong with this code...
> I'm trying to initialize a disk from my app.
>
> FJ II (the 'ScanVolumes' function), tells me that my mounted
> diskette has a Vref of -3.
> When i pass -3 to FN DIBADMOUNT, i always get an error -56.

You are passing a volume reference number, but DIBADMOUNT wants a drive
number.  They are two different things.

The volume reference number is always negative, and is assigned to the volume
at the time it is mounted (essentially, at the time its icon shows up on your
desktop).  Theoretically, if you have a bank of floppy drives (or CD drives,
etc.) you could move a single volume (disk) from one drive to another and have
it recognized as the same volume (with the same vol. ref. number) regardless
of which drive it's in (actually, this will only work if you eject the volume
without "unmounting" it).  The vol. ref. number is meant to stand for the
"logical" volume of data, regardless of its physical location.

The drive number is always positive, and is assigned to the drive as soon as
the system recognizes that the drive is connected to the machine (usually at
startup time).  The drive number is valid even when there's no volume in the
drive.  The drive number is meant to stand for the physical device, regardless
of what volume (if any) is inside it.

- Rick