2,782 questions
The maximum number of characters for a Netbios computer name is 15. The buffer passed to GetComputerName should be at least 16 characters.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getcomputernamea
C++
BOOL GetComputerNameA(
[out] LPSTR lpBuffer,
[in, out] LPDWORD nSize
);
Is there a maximum length allowed from a computer name, so I can size my lpBuffer?
The maximum number of characters for a Netbios computer name is 15. The buffer passed to GetComputerName should be at least 16 characters.