CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: GetUserName

  1. #1
    Guest

    GetUserName

    how can i get the username for win9x
    GetUserName() only works proper with win NT


  2. #2
    Join Date
    May 1999
    Posts
    7

    Re: GetUserName

    For me the following code worked well with Win95. But I could never find out why it did not work reliably during the login script.

    char buffer[1000];
    int size;
    CString Username;

    //Benutzer ermitteln
    size=sizeof(buffer);
    GetUserName(buffer, &size);
    Username = buffer;

    Hiran


  3. #3
    Guest

    Re: GetUserName

    Thank you for your answere but your code don't work.
    the function GetUserName must have a unsigned lond as the 2nd param.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured