File 如何确定文件是在可移动驱动器中还是在本地驱动器中

File 如何确定文件是在可移动驱动器中还是在本地驱动器中,file,mfc,visual-c++,location,File,Mfc,Visual C++,Location,如何在vc++中确定文件是在可移动驱动器上还是在本地驱动器上?调用API 编辑: 调用API 编辑: UINT driveType=GetDriveType(lpFileName);if(driveType==驱动器_固定){/*固定驱动器*/}else if(driveType==驱动器_CDROM | | driveType==驱动器_可移动){/*可移动驱动器*/}else{/*其他情况,例如网络、RAM磁盘*/}UINT driveType=GetDriveType(lpFileName

如何在vc++中确定文件是在可移动驱动器上还是在本地驱动器上?

调用API

编辑:

调用API

编辑:


UINT driveType=GetDriveType(lpFileName);if(driveType==驱动器_固定){/*固定驱动器*/}else if(driveType==驱动器_CDROM | | driveType==驱动器_可移动){/*可移动驱动器*/}else{/*其他情况,例如网络、RAM磁盘*/}
UINT driveType=GetDriveType(lpFileName);if(driveType==驱动器_固定){/*固定驱动器*/}else if(driveType==驱动器_CDROM | | driveType==驱动器_可移动){/*可移动驱动器*/}else{/*其他情况,例如网络、RAM磁盘*/}
UINT driveType = GetDriveType(lpFileName); 
if (driveType == DRIVE_FIXED) 
{ 
    /* fixed drive */ 
} 
else if (driveType == DRIVE_CDROM || driveType == DRIVE_REMOVABLE) 
{ 
    /* removable drive */ 
} 
else 
{ 
    /* other case e.g. network, RAM disk */ 
}