get_computer_name


bool get_computer_name(character* buffer,
                       unsigned* size)

This function obtains the name of the computer.

Parameters

character* buffer

A pointer to a buffer to receive the name of the computer.

unsigned* size

A pointer to a variable containing the length of the buffer provided by the previous parameter. If the specified buffer size is too small, the function fails and the variable is updated to contain the required size. If the function succeeds, the variable is updated to contain the number of bytes copied to the buffer, not including the null terminator.

Return

bool

true The function succeeded.
false The call failed.

Notes

DNS names may exceed computer_name_maximum in length.