how can i get the username for win9x
GetUserName() only works proper with win NT
Printable View
how can i get the username for win9x
GetUserName() only works proper with win NT
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
Thank you for your answere but your code don't work.
the function GetUserName must have a unsigned lond as the 2nd param.