Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

DNS_SERVICE_INSTANCE structure (windns.h)

Represents a DNS service running on the network.

Syntax

typedef struct _DNS_SERVICE_INSTANCE {
#if ...
 DNSSD_RPC_STRING pszInstanceName;
#else
 LPWSTR pszInstanceName;
#endif
#if ...
 DNSSD_RPC_STRING pszHostName;
#else
 LPWSTR pszHostName;
#endif
 IP4_ADDRESS *ip4Address;
 IP6_ADDRESS *ip6Address;
 WORD wPort;
 WORD wPriority;
 WORD wWeight;
 DWORD dwPropertyCount;
#if ...
 DNSSD_RPC_STRING *keys;
#if ...
 DNSSD_RPC_STRING *values;
#else
 PWSTR *keys;
#endif
#else
 PWSTR *values;
#endif
 DWORD dwInterfaceIndex;
} DNS_SERVICE_INSTANCE, *PDNS_SERVICE_INSTANCE;

Members

pszInstanceName

A string that represents the service name. This is a fully qualified domain name that begins with a service name, and ends with ".local". It takes the generalized form "<ServiceName>._<ServiceType>._<TransportProtocol>.local". For example, "MyMusicServer._http._tcp.local".

pszHostName

A string that represents the name of the host of the service.

ip4Address

A pointer to an IP4_ADDRESS structure that represents the service-associated IPv4 address.

ip6Address

A pointer to an IP6_ADDRESS structure that represents the service-associated IPv6 address.

wPort

A value that represents the port on which the service is running.

wPriority

A value that represents the service priority.

wWeight

A value that represents the service weight.

dwPropertyCount

The number of properties—defines the number of elements in the arrays of the keys and values parameters.

keys

values

dwInterfaceIndex

A value that contains the interface index on which the service was discovered.

Remarks

pszInstanceName. A string that represents the service name. This is a fully qualified domain name that begins with a service name, and ends with ".local". It takes the generalized form "<ServiceName>._<ServiceType>._<TransportProtocol>.local". For example, "MyMusicServer._http._tcp.local".

pszHostName. A string that represents the name of the host of the service.

keys. A pointer to an array of string values that represent the property keys.

  values. A pointer to an array of string values that represent the corresponding property values.

Requirements

Requirement Value
Minimum supported client Windows 10 [desktop apps only]
Header windns.h

Feedback

Was this page helpful?

Additional resources