Howdy, Stranger!

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


StringBuilder conversion

So I have this code:

windows ...

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

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

user := u;
computer := c;

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.