GetDriveType判断磁盘类型

来自http://tunps.com/getdrivetype

UINT driveType;
TCHAR szBuffer[100];
driveType=GetDriveType("c:\\");
wsprintf (szBuffer, TEXT("%d"), driveType) ;
MessageBox(NULL,szBuffer,szBuffer,MB_OK);
返回值:
Value Meaning
DRIVE_UNKNOWN The drive type cannot be determined.
DRIVE_NO_ROOT_DIR The root path is invalid. For example, no volume is mounted at the path.
DRIVE_REMOVABLE The disk can be removed from the drive.
DRIVE_FIXED The disk cannot be removed from the drive.
DRIVE_REMOTE The drive is a remote (network) drive.
DRIVE_CDROM The drive is a CD-ROM drive.
DRIVE_RAMDISK The drive is a RAM disk.

About tunpishuang

just 4 fun·····
This entry was posted in 未分类 and tagged , . Bookmark the permalink.

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>