DhcpCreateClientInfoV4 function (dhcpsapi.h)

The DhcpCreateClientInfoV4 function creates a client information record on the DHCP server, extending the functionality of DhcpCreateClientInfo by including the client type (DHCP or BOOTP) in the record.

Syntax

DWORD DHCP_API_FUNCTION DhcpCreateClientInfoV4(
  [in] DHCP_CONST WCHAR               *ServerIpAddress,
  [in] DHCP_CONST DHCP_CLIENT_INFO_V4 *ClientInfo
);

Parameters

[in] ServerIpAddress

Unicode string that specifies the IP address or hostname of the DHCP server.

[in] ClientInfo

Pointer to a DHCP_CLIENT_INFO_V4 structure that contains information about the DHCP client, including the assigned IP address, the subnet mask, the host, and the client type (DHCP and/or BOOTP).

Return value

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

Return code Description
ERROR_ACCESS_DENIED
This call was performed by a client who is not a member of the "DHCP Administrators" security group.

Remarks

When successful, a call to this additionally marks the specified DHCP client IPv4 address as unavailable, in order to avoid IP duplication.

Requirements

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

See also

DHCP_CLIENT_INFO_V4

DhcpCreateClientInfo