On Windows 7 to retrieve the name of a logged on user I can do this:
LPTSTR pUserName = NULL; DWORD dwcbSzUserName = 0; //\'dwSessID\' = user session ID if(WTSQ
You could try NetUserGetInfo with USER_INFO_23 to get full name.
Something basically like:
//Got user name in 'pUserName' NetUserGetInfo(NULL, pUserName, 23, my_USER_INFO_23); //Got display name in my_USER_INFO_23.usri23_full_name