procedure TForm1.FormCreate(Sender: TObject);
var
buf:array [0..MAX_PATH-1] of char;
m_Result:Integer;
i:Integer;
str_temp:string;
begin
m_Result:=GetLogicalDriveStrings(MAX_PATH,buf);
for i:=0 to (m_Result div 4)-1 do
begin
str_temp:=string(buf[i*4]+buf[i*4+1]+buf[i*4+2]);
ListBox1.Items.Add(str_temp);
end;
end;
轉貼至: https://www.codenong.com/cs105404755/
沒有留言:
張貼留言