随笔 - 2146  文章 - 97 评论 - 11767 trackbacks - 253

//声明:
GetDriveType(
  lpRootPathName: PChar {磁盘根目录}
): UINT;

//返回值:
DRIVE_UNKNOWN     = 0; {未知}
DRIVE_NO_ROOT_DIR = 1; {可移动磁盘}
DRIVE_REMOVABLE   = 2; {软盘}
DRIVE_FIXED       = 3; {本地硬盘}
DRIVE_REMOTE      = 4; {网络磁盘}
DRIVE_CDROM       = 5; {CD-ROM}
DRIVE_RAMDISK     = 6; {RAM 磁盘}

//举例: procedure TForm1.FormCreate(Sender: TObject); var c: Cardinal; begin c := GetDriveType('C:'); ShowMessage(IntToStr(c)); {3; 说明是本地硬盘} end;
posted on 2008-02-11 15:33  万一  阅读(...)  评论(...编辑  收藏