请赐教!delphi中API GETVOLUMEINFORMATION 的使用。

jearry_zhou 2001-06-08 11:21:00
最好写上源码。
...全文
144 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Kingron 2001-06-08
  • 打赏
  • 举报
回复
来自我主页(http://kingron.myetang.com)的那个Winapi全家福里面的一个帮助文件!
procedure TForm1.Button1Click(Sender: TObject);
var
RootPath: array[0..20] of Char; // holds the root directory name
VolName: array[0..255] of Char; // holds the volume name
SerialNumber: DWORD; // holds the serial number
MaxCLength: DWORD; // holds the maximum file component length
FileSysFlag: DWORD; // holds file system flags

FileSysName: array[0..255] of Char; // holds the name of the file system
begin
{indicate information is to be retrieved from the C drive}
RootPath := 'C:\';

{retrieve the volume information}
GetVolumeInformation(RootPath, VolName, 255, @SerialNumber, MaxCLength,
FileSysFlag, FileSysName, 255);

{display the information}
Panel2.Caption := VolName;
Panel3.Caption := IntToHex(SerialNumber,8);

Panel4.Caption := FileSysName;
end;

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧