Freigeben über


hostent (Windows CE 5.0)

Send Feedback

This structure is used by functions to store information about a given host, such as host name, IP address, and so forth. An application should never attempt to modify this structure or to free anything inside the structure. Furthermore, only one copy of this structure is allocated per thread, and an application should therefore copy any information that it needs before issuing any other Windows Sockets API calls.

struct hostent {char FAR* h_name;char FAR* FAR* h_aliases;short h_addrtype;short h_length;char FAR* FAR* h_addr_list;};

Members

  • h_name
    Official name of the host computer. If using the DNS or similar resolution system, it is the fully qualified domain name (FQDN) that caused the server to return a reply. If using a local hosts file, it is the first entry after the IP address.
  • h_aliases
    Null-terminated array of alternate names.
  • h_addrtype
    Type of address being returned.
  • h_length
    Length of each address, in bytes.
  • h_addr_list
    Null-terminated list of addresses for the host. Addresses are returned in network byte order. The macro h_addr is defined to be h_addr_list[0] for compatibility with older software.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Winsock2.h.

See Also

gethostbyaddr

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.