获得逻辑驱动器用 DWORD GetLogicalDriveStrings( DWORD nBufferLength, // size of buffer LPTSTR lpBuffer // pointer to buffer for drive strings );
获得逻辑驱动器的类型用 The GetDriveType function determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive. UINT GetDriveType( LPCTSTR lpRootPathName // pointer to root path );
lstrcpy(szDir,"c:\\");
for( int nIndex = 0; nIndex < 10; nIndex++)
{
szDir[0] = 'd' + nIndex;
if(GetDriveType(szDir)==DRIVE_FIXED)
}
lstrcpy(szDir,"c:\\");
for( int nIndex = 0; nIndex < 10; nIndex++)
{
szDir[0] = 'd' + nIndex;
if(GetDriveType(szDir)==DRIVE_FIXED)
}
DWORD GetLogicalDriveStrings(
DWORD nBufferLength, // size of buffer
LPTSTR lpBuffer // pointer to buffer for drive strings
);
The GetDriveType function determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive. UINT GetDriveType(
LPCTSTR lpRootPathName // pointer to root path
);