|
-
Nov 7th, 2002, 04:23 AM
#1
Thread Starter
Fanatic Member
Test if disk is in A:\ (resolved)
i'm using this code to test if a disk is in drive A:
VB Code:
Dim lSerial As Long 'Used to store the serial # of the disk
GetVolumeInformation "A:\", "", 255, lSerial, 0, 0, "", 255
but it keeps returning 0 for the serial #, although it was working yesterday. is it possible for disks to have a serial # of 0, or am i just doing something wrong?
thanks
Last edited by tr0n; Nov 7th, 2002 at 04:32 AM.
-
Nov 7th, 2002, 04:32 AM
#2
Thread Starter
Fanatic Member
ah, nevermind, just found this:
VB Code:
Private Function IsFloppyReady(sDrive As String) As Boolean
Dim sVolumeName As String
Dim dwVolumeSize As Long
sVolumeName = Space$(32)
dwVolumeSize = Len(sVolumeName)
'success at accessing the drive returns a 1
IsFloppyReady = GetVolumeInformation(sDrive, sVolumeName, dwVolumeSize, 0&, 0&, 0&, vbNullString, 0&)
End Function
Last edited by tr0n; Nov 7th, 2002 at 04:45 AM.
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
|