The R_DhcpSetDnsRegCredentials method sets the DNS user name and credentials in the DHCP server which is used for DNS registrations for DHCP client lease record.

 DWORD R_DhcpSetDnsRegCredentialsV5 (
     [in, unique, string]  DHCP_SRV_HANDLE ServerIpAddress,
     [in, string, unique]   LPWSTR Uname,
     [in, string, unique]   LPWSTR Domain,
    [in, string, unique]   LPWSTR Passwd
);

ServerIpAddress: The IP address/host name of the DHCP server. This parameter is unused.

Uname: A pointer to a null-terminated Unicode string that contains the user name for the DNS credentials.

Domain: A pointer to a null-terminated Unicode string that contains the domain name for the DNS credentials.

Passwd: A pointer to a null-terminated Unicode string that contains the password for the DNS user name.

Return Values: A 32-bit unsigned integer value that indicates return status. A return value ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully, else it contains a Win32 error code, as specified in [MS-ERREF]. This error code value can correspond to a DHCP-specific failure, which takes a value between 20000 and 20099, or any generic failure.

Return value/code

Description

0x00000000

ERROR_SUCCESS

The call was successful.

The opnum field value for this method is 87.

When processing this call, the DHCP server MUST do the following:

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].