Up: GEOS SDK TechDocs | Up | Prev: DiskSave() ... | Next: EC() ...

DriveGetDefaultMedia()

MediaType 	DriveGetDefaultMedia(
        word		driveNumber);

This routine returns the default media type for the specified drive. It returns a member of the MediaType enumerated type (described in the Data Structures reference). Note that a drive can be used for media types other than the default. For example, a high-density 3.5-inch drive will have a default media type of MEDIA_1M44, but it can read from, write to, and format 3.5-inch disks with size MEDIA_720K.

See Also: DriveTestMediaSupport().

Include: drive.h

DriveGetExtStatus()

word	DriveGetExtStatus(
        word		driveNumber);

This routine is much like DriveGetStatus() (described immediately below). However, in addition to returning all of the flags set by DriveGetStatus() , it also sets additional flags in the upper byte of the return value. It returns the following additional flags:

DES_LOCAL_ONLY
This flag is set if the device cannot be viewed over a network.
DES_READ_ONLY
This flag is set if the device is read only, i.e. no data can ever be written to a volume mounted on it (e.g., a CD-ROM drive).
DES_FORMATTABLE
This flag is set if disks can be formatted in the drive.
DES_ALIAS
This flag is set if the drive is actually an alias for a path on another drive.
DES_BUSY
This flag is set if the drive will be busy for an extended period of time (e.g., if a disk is being formatted).

If an error condition exists, DriveGetExtStatus() returns zero.

See Also: DriveGetStatus().

Include: drive.h

DriveGetName()

char *	DriveGetName(
        word	driveNumber,	/* Get name of this drive */
        char *	buffer,	/* Write name to this buffer */
        word	bufferSize);	/* Size of buffer (in bytes) */

This routine finds the name of a specified drive. You should use this name when prompting the user to take any action regarding this drive (e.g. to insert a disk). The routine writes the name, as a null terminated string, to the buffer passed. It returns a pointer to the trailing null. If the drive does not exist, or the buffer is too small, DriveGetName() returns a null pointer.

Include: drive.h

DriveGetStatus()

word	DriveGetStatus(
        word	driveNumber);

This routine returns the current status of a drive. The drive is specified by its drive number. The routine returns a word of DriveStatus flags. These flags are listed below:

DS_PRESENT
This flag is set if the physical drive exists, regardless of whether the drive contains a disk.
DS_MEDIA_REMOVABLE
This flag is set if the disk can be removed from the drive.
DS_NETWORK
This flag is set if the drive is accessed over a network (or via network protocols), which means the drive cannot be formatted or copied.
DS_TYPE
This is a mask for the lowest four bits of the field. These bits contain a member of the DriveType enumerated type.

If an error condition exists, DriveGetStatus() returns zero.

See Also: DriveGetExtStatus().

Include: drive.h

DriveTestMediaSupport()

Boolean	DriveTestMediaSupport(
        word		DriveNumber,			
        MediaType		media);				/* Desired disk size */

This routine checks whether the specified drive can support disks in the specified size. It returns true (i.e., non-zero) if the drive supports the size.

See Also: DriveGetDefaultMedia().

Include: drive.h


Up: GEOS SDK TechDocs | Up | Prev: DiskSave() ... | Next: EC() ...