@@ -35,7 +35,7 @@ static BOOLEAN GetUserNameExA(_In_ EXTENDED_NAME_FORMAT NameFormat, _Inout_ std:
|
|||||||
if (::GetLastError() == ERROR_MORE_DATA) {
|
if (::GetLastError() == ERROR_MORE_DATA) {
|
||||||
// Allocate buffer on heap and retry.
|
// Allocate buffer on heap and retry.
|
||||||
sName.resize(ulSize - 1);
|
sName.resize(ulSize - 1);
|
||||||
if (::GetUserNameExA(NameFormat, &ulSize[0], &ulSize))
|
if (::GetUserNameExA(NameFormat, &sName[0], &ulSize))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Reference in New Issue
Block a user