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:
parent
0d024b3306
commit
ca0dce68d5
8 changed files with 131 additions and 24 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue