1.我想做个自动读取驱动器盘符,该如何实现,请各位帮帮!
解决方案 »
- 谢谢大家在开心网的投票支持,散分
- 做一程序但不知如何調用Dos下的net send ComputerName 'message'中net Send的命令,請各們達人指教。
- 请教关于RichEdit的字色问题
- Delphi中shockwaveflash控件的如何使用?
- 关于基于UDP协议的通信!老是会造成网络堵塞!WHY?
- 我在delphi窑洞注册过N次(都已成功),但怎么总是登陆不上?提示什么用户不存在或密码错误!
- 有关报表?
- 用delphi开发工资管理系统时遇到的问题!
- 大量收购国外软件下载网站
- 强烈抗议<程序员>把代码放到网站上的做法!!!!
- 我的程序怎么运行这么慢,如何提高程序运行速度呢?现在有4个for循环,它的结构如下-----------请高手指点
- 请教各位高手 怎样屏蔽掉Memo控件的键盘事件
Windows.PasSyntax
GetDriveType(
lpRootPathName: PChar {a pointer to the root path string}
): UINT; {returns a value based on the drive type}Description
GetDriveType is used to determine the type of drive being accessed, and will indicate fixed, removable, or remote (network) drives.Parameters
lpRootPathName: A null terminated string containing the root directory of the drive to be queried. If this parameter is NIL, the function uses the root of the current directory.Return Value
If the function is successful, it returns one value, otherwise it returns DRIVE_UNKNOWN.The Tomes of Delphi 3: Win32 Core API Help File by Larry Diehlprocedure TForm1.DriveComboBox1Change(Sender: TObject);
var
DrivePath: array[0..3] of char; // holds the root directory to query
begin
{assemble the name of the root path of the drive to query}
StrPCopy(DrivePath, DriveComboBox1.Drive);
StrCat(DrivePath, ':\'); {retrieve the drive type and display it}
case GetDriveType(DrivePath) of
DRIVE_UNKNOWN: Panel1.Caption := 'No Type Information'; DRIVE_NO_ROOT_DIR: Label1.Caption := 'Root Directory does not exist';
DRIVE_REMOVABLE: Panel1.Caption := 'Removable';
DRIVE_FIXED: Panel1.Caption := 'Fixed';
DRIVE_REMOTE: Panel1.Caption := 'Remote';
DRIVE_CDROM: Panel1.Caption := 'CDROM';
DRIVE_RAMDISK: Panel1.Caption := 'RamDisk';
end;
end;The Tomes of Delphi 3: Win32 Core API Help File by Larry Diehl