Browse Source

Windows: Use GetComputerNameEx() in SystemStats::getComputerName() to allow names longer than 15 characters

tags/2021-05-28
ed 6 years ago
parent
commit
a5d546b25d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modules/juce_core/native/juce_win32_SystemStats.cpp

+ 1
- 1
modules/juce_core/native/juce_win32_SystemStats.cpp View File

@@ -472,7 +472,7 @@ String SystemStats::getComputerName()
{ {
TCHAR text[128] = { 0 }; TCHAR text[128] = { 0 };
auto len = (DWORD) numElementsInArray (text) - 1; auto len = (DWORD) numElementsInArray (text) - 1;
GetComputerName (text, &len);
GetComputerNameEx (ComputerNamePhysicalDnsHostname, text, &len);
return String (text, len); return String (text, len);
} }


Loading…
Cancel
Save