DNS_SRV_DATAW structure (windns.h)

The DNS_SRV_DATA structure represents a DNS service (SRV) record as specified in RFC 2782.

Syntax

typedef struct {
  PWSTR pNameTarget;
  WORD  wPriority;
  WORD  wWeight;
  WORD  wPort;
  WORD  Pad;
} DNS_SRV_DATAW, *PDNS_SRV_DATAW;

Members

pNameTarget

A pointer to a string that represents the target host.

wPriority

The priority of the target host specified in pNameTarget. Lower numbers imply higher priority to clients attempting to use this service.

wWeight

The relative weight of the target host in pNameTarget to other hosts with the same wPriority. The chances of using this host should be proportional to its weight.

wPort

The port used on the target host for this service.

Pad

Reserved for padding. Do not use.

Remarks

The DNS_SRV_DATA structure is used in conjunction with the DNS_RECORD structure to programmatically manage DNS entries.

Note

The windns.h header defines DNS_SRV_DATA as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header windns.h

See also

DNS_RECORD