来自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. |
This entry was posted in 未分类 and tagged
c,
winapi. Bookmark the
permalink.