DhcpV6CreateClientInfo function (dhcpsapi.h)

The DhcpV6CreateClientInfo function creates a DHCPv6 client lease record in the DHCP server database.

Syntax

DWORD DHCP_API_FUNCTION DhcpV6CreateClientInfo(
  [in, optional] DHCP_CONST WCHAR                 *ServerIpAddress,
  [in]           DHCP_CONST LPDHCP_CLIENT_INFO_V6 ClientInfo
);

Parameters

[in, optional] ServerIpAddress

Pointer to a null-terminated Unicode string that represents the IP address or hostname of the DHCP server.

[in] ClientInfo

Pointer to a DHCP_CLIENT_INFO_V6 structure that contains the DHCP client lease record information. The ClientIpAddress, ClientDUID and IAID fields of this structure are required, all others are optional.

Return value

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, it returns one of the following or an error code from DHCP Server Management API Error Codes.

Value Meaning
ERROR_INVALID_PARAMETER
ClientDUID in the ClientInfo parameter was NULL or a zero length buffer.
ERROR_ACCESS_DENIED
This call was performed by a client that is not a member of the DHCP Administrators security group.
ERROR_DHCP_SUBNET_NOT_PRESENT
The specified subnet does not exist. In this case, there is no subnet corresponding to ClientIpAddress in the ClientInfo parameter.
ERROR_DHCP_CLIENT_EXISTS
The provided DHCP client record already exists in the DHCP server database.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header dhcpsapi.h
Library Dhcpsapi.lib
DLL Dhcpsapi.dll

See also

DhcpV4CreateClientInfo

DhcpV4GetClientInfo