mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
A careful reading of the GetUserName documentation and Windows Data Types says that lpnSize is "the number of TCHARs copied to the buffer...including the terminating null character," and a TCHAR in this environment is a CHAR because we assume UNICODE is always defined for CoreCLR. A CHAR is a byte. So lpSize is number of bytes, not number of UTF-16 characters as we previously believed.