Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Who's logged on?

Status
Not open for further replies.

dds82

Programmer
Jun 5, 2002
251
US
If I have the name of a computer on the local network, can I find out who's currently logged on to that computer? All the computers run Windows NT Workstation 4.0.
 
I am not 100% positive on this but I think you need to make an app that can send a message back to you. The call to find out who is logged on is:

char usrName[50];
DWORD dwUsrBufferSize = 50;

if(GetUserName((LPSTR)usrName,&dwUsrBufferSize))
{
return the usrName;
}

Matt
 
There's no API call that takes a computer name as a parameter and returns the username of who's logged on to that computer?
 
Also, if I have a username, how do I get that person's real name?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top