1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-04 03:40:07 +00:00

Added methods to SystemStats to return the user's name.

This commit is contained in:
Julian Storer 2010-02-05 18:36:19 +00:00
parent 0d024b3306
commit ca0dce68d5
8 changed files with 131 additions and 24 deletions

View file

@ -390,4 +390,20 @@ int SystemStats::getPageSize() throw()
return systemInfo.dwPageSize;
}
//==============================================================================
const String SystemStats::getLogonName()
{
TCHAR text [256];
DWORD len = numElementsInArray (text) - 2;
zerostruct (text);
GetUserName (text, &len);
return String (text, len);
}
const String SystemStats::getFullUserName()
{
return getLogonName();
}
#endif