Get the local login name for the given Microsoft Account returned by NetWkstaUserEnum API on Windows 8 and above
问题 I am using NetWkstaUserEnum() to get the local users name and its domain details. Till Windows 7 it used to return only the login name and it worked fine. From Windows 8 onwards Microsoft Account was added and for this type of account the API started returning the Microsoft Account name instead of the local login name. For example it returned username@outlook.com instead of usern_0000 which is the actual Windows local login name. I cannot use NetUserEnum() as it does not return the domain