Fórum Hd Principal #268356
13/02/2005
0
Ipod I
Curtir tópico
+ 0Posts
13/02/2005
Beppe
procedure TForm1.Button1Click(Sender: TObject); var Dir: array[0..MAX_PATH] of Char; begin Dir := 0; GetWindowsDirectory(@Dir, Length(Dir)); Caption := Dir[0]; end;
O caminho até o diretório do Windows é copiado para o array Dir. Dir[0] representa o drive.
Gostei + 0
13/02/2005
Ipod I
Gostei + 0
13/02/2005
Beppe
O correto é:
procedure TForm1.Button1Click(Sender: TObject); var Dir: array[0..MAX_PATH] of Char; begin Dir := 0; GetWindowsDirectory(@Dir, Length(Dir) - 1); Caption := Dir[0]; end;
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)