Is there a way to get the login name of the user that is currently logon to the PC that's running my application.
Thanx
Printable View
Is there a way to get the login name of the user that is currently logon to the PC that's running my application.
Thanx
GetUserName() ?
Thnak you,
I feel stupid.. but thanx.
GetUserName() is only retrieve the logon name, and how to get the full name of this account that exists in Primary Domain Control(PDC)?
**************************
* Cao Jiling *
**************************
// some useful functinos to lookup
GetUserName(); // Get Loged on Username
NetGetDCName(..); // Get DomainController
NetUserGetInfo(...); // Get Additional info(shares/Full name etc..)
NetApiBufferFree(...); // use to free the buffer used previously
// if you have msdn library these functions referes to the net access functions
Happy searching and good luck /Thomas Rizos