gethostname function winsock

Win32Result<int> gethostname(
  1. PSTR name,
  2. int namelen
)

Retrieves the standard host name for the local computer.

To learn more, see learn.microsoft.com/windows/win32/api/winsock/nf-winsock-gethostname.

Implementation

Win32Result<int> gethostname(PSTR name, int namelen) {
  final result_ = gethostname_Wrapper(name, namelen);
  return Win32Result(value: result_.value.i32, error: result_.error);
}