Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

doctorsixstring

Getting a User Name

This topic is 5909 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How can I get the name of the currently logged in user? I have tried GetUserName(), but it returns this error: "The operation being requested was not performed because the user has not logged on to the network. The specified service does not exist." I am using VC++ 6.0 with Win32. I am working in Win98, but I need to be able to get the user''s log-in name from both Win9x and WinNT based systems. Thanks in advance, Mike

Share this post


Link to post
Share on other sites
Advertisement
If the user doesn''t log in then there is no username to get. Reread the error message.

Share this post


Link to post
Share on other sites
Probably just what the error message says, no one is logged
in when you run the program. This is possible on Win9X
systems, but not so in WinNT systems.

NetUserGetInfo() probably better to use, but it''s only
available on NT systems.


~~~~
Kami no Itte ga ore ni zettai naru!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!