DhcpServerQueryDnsRegCredentials function

The DhcpServerQueryDnsRegCredentials function retrieves the current Domain Name System (DNS) credentials used by the DHCP server for client dynamic DNS registration.

Syntax


DWORD WINAPI DhcpServerQueryDnsRegCredentials(
  _In_  DHCP_SRV_HANDLE ServerIpAddress,
  _In_  ULONG           UnameSize,
  _Out_ LPWSTR          Uname,
  _In_  ULONG           DomainSize,
  _Out_ LPWSTR          Domain
);

Parameters

ServerIpAddress [in]

DHCP_SRV_HANDLE that specifies the RPC binding to the DHCP server that will be queried.

UnameSize [in]

Unsigned 32-bit integer that indicates the size, in bytes, to allocate for the data returned in the Uname buffer.

Uname [out]

Pointer to a null-terminated Unicode string that contains the user name for the DNS server credentials. The size of this value cannot be larger than the size specified in UnameSize.

DomainSize [in]

Unsigned 32-bit integer that indicates the size, in bytes, to allocate for the data returned in the Domain buffer.

Domain [out]

Pointer to a null-terminated Unicode string that contains the domain name for the DNS server credentials. The size of this value cannot be larger than the size specified in DomainSize.

Return value

This function returns ERROR_SUCCESS upon a successful call. Otherwise, it returns one of the DHCP Server Management API Error Codes.

Remarks

DNS credentials can be set on the DHCP server by calling the DhcpServerSetDnsRegCredentialsV5 function.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Dhcpsapi.h

Library

Dhcpsapi.lib

DLL

Dhcpsapi.dll

See also

DhcpServerSetDnsRegCredentialsV5

 

 

Show: