IP address to logged username translation

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

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
 
Open the "HKEY_USERS" registry key (RegConnectRegistry method) and enumerate
subkeys (RegEnumKeyEx method).

You should have keys with the names equal to the SID of the logged on users
(plus some extra), then use LookupAccountSid() to get the username.


Arild
 
Back
Top