Link to home
Start Free TrialLog in
Avatar of inviser
inviser

asked on

Query System for Current logged in user

I have a basic visual c++ 2005 console app and I need a way to query information from the computer on which the application is running that will return the username of the current user logged into windows. The machines will be running windows xp. I'm sure there is a system API for this, but I don't know which one.
Avatar of Axter
Axter
Flag of United States of America image

Hi inviser,
> I'm sure there is a system API for this, but I don't know which one.

You can use GetUserName API function

David Maisonave (Axter)
Cheers!
ASKER CERTIFIED SOLUTION
Avatar of Axter
Axter
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial