Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

StringBuilder conversion

So I have this code:

[code]uses
windows ...

var
u: array[0..127] of Char;
c: array[0..127] of Char;
user: string;
computer: string;
sz: dword;
begin
sz := SizeOf(u);
GetUserName(u, sz);

sz := SizeOf(c);
GetComputerName(c, sz);

user := u;
computer := c;
end;[/code]

The problem is with this code that Turbo Delphi don't accept it as a valid code. I need someone to show me how to convert this so it uses StringBuilder instead of arrays.
Sign In or Register to comment.