. DirectXtras Home
        Home

DirectCommunication Xtra
DirectConnection Xtra
DirectControl Xtra
DirectEmail Xtra
DirectFTP Xtra
DirectImage Xtra
DirectInteraction Xtra
DirectOS Xtra
Documentation
License Agreement
Licensing Fees
Order Form
DirectSMS Xtra
DirectSound Xtra
DirectTransition Xtra
DirectTransition3D Xtra Set I
DirectTransition3D Xtra Set II
DirectTransition3D Xtra Set III
DirectTTS Xtra
XtrAgent
DirectXport Xtra

SpeechPlugin

Special Discounted Bundles

The Gallery
How To Order
Order Form
Check for Upgrades

Sign in
Change Your Profile

Contact Us
















    .
DirectXtras
Xtra Power for Director & Authorware



DirectOS Xtra
 Directing Windows and MacOS. The OS at your fingertips!

Authorware 4.x Compatible Authorware 5.x CompatibleAuthorware 6.x CompatibleAuthorware 7.x CompatibleDirector 5.x Compatible Director 6.x CompatibleDirector 7.x Compatible Director 8.x CompatibleDirector MX Compatible     MacOS 8.x and 9.x CompatibleMacOS X CompatibleWindows Compatible   

dosGetDriveInfo(string Drive, string Info)

Provides information about the specified drive. The drive is specified as a string in the Drive parameter as the root folder of the desired drive.  The exact type of information requested is determined by the Info parameter. 

Parameters :

Drive : A string specifying the root folder of the desired drive. For example, "C:\" on Windows or "My Mac:" on MacOS.
Info : A string specifying which type of drive information to return. This parameter is case insensitive. 
Possible Values For Windows And MacOS :
"Type" : Returns a string containing the drive type. Possible return values are: "Fixed" such as a hard drive, "Remote" such as a network drive, "Removable" such as floppy disk, "CD ROM" and "RAM Disk". 
"Name" : Returns a string containing the drive name. On Windows, this corresponds to the disk label. On MacOS, this will return the disk name in the correct case and without a colon at the end. 
"Size" : Returns an integer containing the total size of the drive in kilobytes.
"Free Space" : Returns an integer containing the total amount of free space on the drive in kilobytes.
Possible Values For Windows Only :
"Serial Number" : Returns a string containing the serial number of the disk. This string is a hexadecimal representation of the serial number. For example, "86615ED". 

Return Values : Returns a string or an integer depending on the value of the the Info parameter. If an error occurred, the return value will be an empty string if the function is supposed to return a string, or the integer 0, if the function is supposed to return an integer. In that case, dosGetLastError() should be called to determine the cause of the error. 

Possible Returned Error Codes via dosGetLastError() :
10002 : Invalid value for parameter 2. 
10013 : Drive not found. 

Remarks : Windows 9X returns a different serial number than Windows NT4, 2000, XP and later for the same CD-Rom. For example, if the serial number under Windows XP is 280B-965E it would be 5E96-OB28 under Windows 98. You can write a script that converts Windows 9X serial numbers to the format they are stored in newer versions of Windows by doing the following:

1) If the serial numbers are shorter than 8 characters, append zeros at the beginning of the numbers so that they would be 8 characters long. This should be done on both Windows 9X and Window NT serial numbers.

2) Take the last two digits of the serial number returned by Windows 98, set them as the first two digits of a new number. Take the 5th and 6th digits of the Windows 9X number, set them as the 3rd and 4th digits in the new number, respectively. Take the 3rd and 4th digits of the Windows 9X number, set them as the 5th and 6th digits of the new number, respectively. Take the first two digits of the Windows 9X number, set them as the last 2 digits of the new number. The newly created number should be a serial number similar to the one reported on Windows NT4 and later.

Under MacOS X the function returns drive type "Removable" for CD ROM drives.



DirectXtras Inc.
P.O Box 2645, Menlo Park, CA, 94026, U.S.A
Voice: +1-415-5058249, Fax: +1-801-8585841
Toll Free: 1-800-4453093
E-mail General Information: info@directxtras.com
E-mail Technical Support: support@directxtras.com

Copyright 1996-2004 DirectXtras Inc. All Rights Reserved.
WebMaster: tamar@directxtras.com
Last Updated: 12/19/2002 12:58:11 AM.