DhcpServerSetConfigVQ function (dhcpsapi.h)

The DhcpServerSetConfigVQ function sets or updates DHCP server settings.

Syntax

DWORD DHCP_API_FUNCTION DhcpServerSetConfigVQ(
  [in] DHCP_CONST WCHAR             *ServerIpAddress,
  [in] DWORD                        FieldsToSet,
  [in] LPDHCP_SERVER_CONFIG_INFO_VQ ConfigInfo
);

Parameters

[in] ServerIpAddress

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

[in] FieldsToSet

Specifies a bitmask of the fields to set in the DHCP_SERVER_CONFIG_INFO_VQ structure passed to ConfigInfo.

[in] ConfigInfo

Pointer to a DHCP_SERVER_CONFIG_INFO_VQ structure that contains the new or updated settings for the DHCP server.

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

Most settings are effective immediately and do not require a restart.

The following DHCP server settings require a restart of the DHCP service:

  • Set_APIProtocolSupport
  • Set_DatabaseName
  • Set_DatabasePath
  • Set_DatabaseLoggingPath
  • Set_RestoreFlag

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_SERVER_CONFIG_INFO_VQ