📄 informationdisqueunit1.pas
字号:
unit InformationDisqueUnit1;
//michel.bardou@wanadoo.fr
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
EditNomRepertoireRacine: TEdit;
Label1: TLabel;
Label2: TLabel;
LabelNomVolume: TLabel;
Label3: TLabel;
LabelLongueurMaxiNomFichier: TLabel;
LabelNumSerie: TLabel;
Label4: TLabel;
Label5: TLabel;
LabelSystemeDeFichier: TLabel;
procedure Button1Click(Sender: TObject);
private
{ D閏larations priv閑s }
public
{ D閏larations publiques }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
Repertoire:PChar;
NomVolume: array[0..255] of Char;
NumSerie:DWORD;
LongeurMaxNomFichier:DWORD;
TypeCase:DWORD;
FileSystem: array[0..255] of Char;
begin
Repertoire:=PChar(EditNomRepertoireRacine.Text);
if not GetVolumeInformation(Repertoire,NomVolume,SizeOf(NomVolume),@NumSerie,
LongeurMaxNomFichier,TypeCase, FileSystem,sizeOf(FileSystem))
then ShowMessage('erreur');
LabelNomVolume.Caption:=String(NomVolume);
LabelLongueurMaxiNomFichier.Caption:=IntToStr(LongeurMaxNomFichier)+' Caract鑢es';
LabelNumSerie.Caption:=IntToStr(NumSerie);
LabelSystemeDeFichier.Caption:=String(FileSystem);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -