Maximum, computer name?

Todd Chester 666 Reputation points


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?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,519 questions
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 43,146 Reputation points

    The maximum number of characters for a Netbios computer name is 15. The buffer passed to GetComputerName should be at least 16 characters.

0 additional answers

Sort by: Most helpful