Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get the computername

0 views
Skip to first unread message

Pete Rose

unread,
Jan 22, 2002, 6:59:36 AM1/22/02
to
Hi,

Can somebody help getting the computername?
I'm trying to get it using the GetComputerName function from the windows
unit, but it's not working, I only get a 3char long strange string....

Thanks in advance

--
met vriendelijke groet,

Jochem Wielders

Enixé IT Consultancy BV
Botnische Golf 9a
3446 CN Woerden

tel: 0348 - 430 222
fax: 0348 - 430 020
mob: 06 - 15028762

www.enixe.nl


"david_henningsson"_nil

unread,
Jan 22, 2002, 7:03:43 AM1/22/02
to

Function ComputerName: String;
var I:Integer;
begin
I := 99;
SetLength(Result,I+1);
Win32Check(GetComputerName(PChar(@Result[1]),I));
SetLength(Result,I);
end;

Pete Rose

unread,
Jan 22, 2002, 7:25:28 AM1/22/02
to
Thanks,

your the best!

<David Henningsson nil> wrote in message news:3c4d551f$1_1@dnews...

Pete Rose

unread,
Jan 22, 2002, 7:25:51 AM1/22/02
to
Thanks,

your the best! Works fine

<David Henningsson nil> wrote in message news:3c4d551f$1_1@dnews...
>

0 new messages