GetComputerName
This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.
Syntax
long GetComputerName(char buffer[], dword bufferSize)
Function
Retrieves the fully qualified name of the computer.
Parameters
buffer Space for the returned name.
bufferSize
Length of the buffer.
Return Values
0 if the function completed successfully, else unequal 0.
char buffer[50];GetComputerName(buffer, elcount(buffer));write("Computer name: %s", buffer);