Article ID: 170609
Article Last Modified on 3/24/2000
**********************************************************
* FUNCTION isdiskin
**********************************************************
*
* Passed - drive root specification, such as "A:\", "B:\", etc
* Returns - logical .T., .F. depending on whether drive exists
*
* Usage -
* ? isdiskin("A:\")
*
* Any drive formatted with an MS operating system > DOS 3.3 will
* have a nonzero volume serial number. If the specified drive
* doesn't exist, it will return a 0 volume serial number. So,
* GetVolumeInformation() can function as a replacement
* for the old IsDiskIn.Bin that used to ship with FoxPro for DOS.
PARAMETERS m.rootpath
DECLARE GetVolumeInformation IN win32api STRING, STRING @, ;
INTEGER, INTEGER @, INTEGER @, INTEGER @, STRING @, INTEGER
m.volname = SPACE(255)
m.volnamelen = LEN(m.volname)
m.volumeserialnumber = 0
m.maxfilenamelen = 0
m.filesystemflags = 0
m.filesystemname = SPACE(255)
m.fsnamelen = LEN(m.filesystemname)
=GetVolumeInformation(m.rootpath, @m.volname, m.volnamelen, ;
@m.volumeserialnumber, @m.maxfilenamelen, ;
@m.filesystemflags, @m.filesystemname, m.fsnamelen)
IF m.volumeserialnumber = 0
RETURN .F.
ELSE
RETURN .T.
ENDIF
Another resolution to the Invalid Page Fault problem is to issue a
DISKSPACE("A"). This command returns a -1 if there is no disk in Drive "A"
and returns some number greater than -1 if there is a disk in Drive "A."
? PUTFILE("Label File","A:\test","dbf")
The following error message appears in Windows 95:
Clicking Details reveals the following message:
In Windows NT 4.0, the following error appears:
The operating system then closes Visual FoxPro.
Keywords: kberrmsg kbbug kbfix kbprb KB170609