DhcpSetSuperScopeV4 function (dhcpsapi.h)
The DhcpSetSuperScopeV4 function sets a subnet as the superscope on a DHCP server.
DWORD DhcpSetSuperScopeV4( DHCP_CONST WCHAR *ServerIpAddress, DHCP_CONST DHCP_IP_ADDRESS SubnetAddress, DHCP_CONST LPWSTR SuperScopeName, DHCP_CONST BOOL ChangeExisting );
Pointer to a Unicode string that specifies the IP address or hostname of the DHCP server.
DHCP_IP_ADDRESS value that contains the IP address of the subnet that will be defined as the superscope.
Pointer to a Unicode string that specifies the new name of the superscope.
Specifies whether or not to change an existing superscope to the supplied subnet. If this parameter is TRUE and another subnet is set as the superscope, change the superscope to the supplied subnet; otherwise, if set to FALSE and another subnet is defined as the superscope, do not change it.
This function returns ERROR_SUCCESS upon a successful call. Otherwise, it returns one of the DHCP Server Management API Error Codes.
||This call was performed by a client who is not a member of the "DHCP Administrators" security group.|
||An error occurred while accessing the DHCP server's database.|
||One of the parameters provides an invalid value.|
A superscope is a subnet that contains the complete scope of all addresses available for lease (or are already leased) across the subnet scopes defined on the DHCP server.
|Minimum supported client||None supported|
|Minimum supported server||Windows Server 2008 R2 [desktop apps only]|