devxlogo

January 15, 2000

DriveType – Determine the type of a drive

Private Declare Function GetDriveType Lib “kernel32” Alias “GetDriveTypeA” _ (ByVal lpRootPathName As String) As LongConst DRIVE_UNKNOWN = 0 ‘ type can’t be determinedConst DRIVE_NO_ROOT_DIR = 1 ‘ wrong argumentConst DRIVE_REMOVABLE

DriveExists – Check whether a logical drive exists

Private Declare Function GetLogicalDriveStrings Lib “kernel32” Alias _ “GetLogicalDriveStringsA” (ByVal nBufferLength As Long, _ ByVal lpBuffer As String) As Long ‘ Check whether a given drive exist’ Note that this

GetFileVersionData – Retrieve file versioning information

Private Declare Function GetFileVersionInfoSize Lib “version.dll” Alias _ “GetFileVersionInfoSizeA” (ByVal lptstrFilename As String, _ lpdwHandle As Long) As LongPrivate Declare Function GetFileVersionInfo Lib “version.dll” Alias _ “GetFileVersionInfoA” (ByVal lptstrFilename As

GetDriveInfo – Drive serial number and other data

Private Declare Function GetVolumeInformation& Lib “kernel32” Alias _ “GetVolumeInformationA” (ByVal lpRootPathName As String, _ ByVal pVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, _ lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, _