I know the IP address of a client computer in an Windows 2000 network.

I would like to retrieve by program (vc++) the name of the user logged
on the computer.

I think there is a mean using Netbios functions, but is there a more
practical mean using AD or DDNS or any other function of windows 2000?

Thank you for your help