The R_DhcpV6CreateClientInfo method creates a DHCPv6 client lease record on the DHCP server.

 DWORD R_DhcpV6CreateClientInfo(
     [in, unique, string] DHCP_SRV_HANDLE  ServerIpAddress,
     [in, ref] LPDHCP_CLIENT_INFO_V6  ClientInfo
 );

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

ClientInfo: A pointer to a DHCP_CLIENT_INFO_V6 (section 2.2.1.2.64) structure that contains the DHCPv6 client lease record information to be set on the DHCPv6 server. The caller MUST pass the ClientIPAddress, ClientDUID, and IAID members when adding a DHCPv6 client lease record to the DHCPv6 server. The ClientDUID member represents a DHCPv6 Client-Identifier as specified in section 2.2.1.2.5.3. The ClientName, ClientComment, ClientLeaseValidLeaseExpires, and OwnerHost members can optionally be passed by the caller and will be set on the DHCPv6 client lease record.

Return Values: A 32-bit unsigned integer value that indicates return status. A return value of ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully. Otherwise, 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 to any generic failure.

Return value/code

Description

0x00000000

ERROR_SUCCESS

The call completed successfully.

0x00004E25

ERROR_DHCP_SUBNET_NOT_PRESENT

The specified subnet does not exist.

0x00004E2E

ERROR_DHCP_CLIENT_EXISTS

The specified client already exists on the server.

The opnum field value for this method is 124.

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 specified in [MS-RPCE].