Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Enterprise
Expertise: Beginner
Aug 8, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Identify Networked CD Drives

The 32-bit API is much richer than the 16-bit API. However, the GetDriveType still reports networked CD drives as just a DRIVE_REMOTE (i.e., a networked drive). While true, it is not particularly helpful. Combine the GetDriveType call with the GetVolumeInformation call to determine that it is both a network drive and a CD drive.

The next-to-last parameter of this call returns a string that gives the type of file system on that volume: FAT, NTFS, HPFS, CDFS (CD File System):

Declare Function GetVolumeInformation _
        Lib "kernel32" Alias _
        "GetVolumeInformationA" (ByVal _
        lpRootPathName As String, ByVal _
        lpVolumeNameBuffer As String,_
        ByVal nVolumeNameSize As Long, _
        lpVolumeSerialNumber As Long, _
        lpMaximumComponentLength As Long, _
        lpFileSystemFlags As Long, ByVal _
        lpFileSystemNameBuffer As String, _
        ByVal nFileSystemNameSize As _
        Long) As Long

        pstrRootPath = "E:\"
        pstrVolName = Space$(256)
        pstrSystemType = Space$(32)
        plngSysTypeSize = CLng(Len(pstrSystemType))
        plngVolNameSize =       CLng(Len(pstrVolName))
        plngRtn = GetVolumeInformation_
                (pstrRootPath, pstrVolName, _
                plngVolNameSize, plngVolSerialNum, _
                plngMaxFilenameLen, plngSysFlags, _
                pstrSystemType, plngSysTypeSize)

L.J. Johnson
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date