|
-
May 9th, 2001, 11:49 AM
#1
Floppy
Can anyone poinmt in the direction of some documentation of working with the floppy drive.
Stuff like: amount of space left on floppy, directories and files on floppy etc.
T'anx
-
May 9th, 2001, 12:03 PM
#2
Frenzied Member
I guess that would be the same as with a harddrive.
-
May 9th, 2001, 12:05 PM
#3
With the exception of "Is the floppy ready?" all of the api stuff for drives works just fine with a floppy drive.
VBNET has a bunch of code for getting all this stuff - search on 'floppy drive' and you'll get about 60 code samples.
-
May 9th, 2001, 12:06 PM
#4
Frenzied Member
It should be no different from a hdd.
Code:
'In general section
Private Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, lpSectorsPerCluster As Long, lpBytesPerSector As Long, lpNumberOfFreeClusters As Long, lpTtoalNumberOfClusters As Long) As Long
Private Sub Form_Load()
Dim Sectors as Long,Bytes as Long,FreeC as Long, TotalC as Long,Total as Long,Freeb as Long
'Retrieve information about the C:\
GetDiskFreeSpace "C:\", Sectors, Bytes, Freec, Totalc
'Set graphic mode to persistent
Me.AutoRedraw = True
'Print the information to the form
Me.Print " Path: C:\"
Me.Print " Sectors per Cluster:" + Str$(Sector)
Me.Print " Bytes per sector:" + Str$(Bytes)
Me.Print " Number Of Free Clusters:" + Str$(Freec)
Me.Print " Total Number Of Clusters:" + Str$(Totalc)
Total = rTotalc& * rSector& * rBytes&
Me.Print " Total number of bytes in path:" + Str$(Total)
Freeb = rFreec& * rSector& * rBytes&
Me.Print " Free bytes:" + Str$(Freeb)
End sub
-
May 9th, 2001, 12:07 PM
#5
Frenzied Member
Ups, sorry, here are the parameters
Code:
· lpRootPathName
Points to a null-terminated string that specifies the root directory of the disk to return information about. If lpRootPathName is NULL, the function uses the root of the current directory.
· lpSectorsPerCluster
Points to a variable for the number of sectors per cluster.
· lpBytesPerSector
Points to a variable for the number of bytes per sector.
· lpNumberOfFreeClusters
Points to a variable for the total number of free clusters on the disk.
· lpTotalNumberOfClusters
Points to a variable for the total number of clusters on the disk.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|