Getting the net id and the machine name...

Hello there !

How can I get the network id and the name of the machine in Delphi ?
I suppose i must get it by a Win API function, but wich one and
how ? Do you have an example please ?

Thanx