Funcao - string para pchar

Top  Previous  Next

Delphi2 String-PChar-String

===========================

 

 

var

   S:String;

begin

     SetLength(S,254);

     GetSystemDirectory(@S[1],Length(S)); { Ou GetSystemDirectory(PChar(S),Length(S));  }

     DirDestino:=String(PChar(S)); { Tem que ser assim segundo "A BIBLIA" do Delphi 2 }

end;