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

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



Full Text Search: The Key to Better Natural Language Queries for NoSQL in Node.js

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