Does anyone know the code to get the current username of the Windows NT system. eg. if my username is s98132, how do I get that in my prog.
Does anyone know the code to get the current username of the Windows NT system. eg. if my username is s98132, how do I get that in my prog.
CHAR name[256];
ULONG size = sizeof(name);
GetUserName(name,&size);
name will contain the current user name.
zen