Expand Minimize

DhcpV6CreateClientInfo function

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

Syntax


DWORD DHCP_API_FUNCTION DhcpV6CreateClientInfo(
  _In_opt_  DHCP_CONST WCHAR *ServerIpAddress,
  _In_      DHCP_CONST LPDHCP_CLIENT_INFO_V6 ClientInfo
);

Parameters

ServerIpAddress [in, optional]

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

ClientInfo [in]

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.

ValueMeaning
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

Minimum supported client

None supported

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Dhcpsapi.h

Library

Dhcpsapi.lib

DLL

Dhcpsapi.dll

See also

DhcpV4CreateClientInfo
DhcpV4GetClientInfo

 

 

Community Additions

ADD
Show:
© 2014 Microsoft