DhcpSetSuperScopeV4 function (dhcpsapi.h)
The DhcpSetSuperScopeV4 function sets a subnet as the superscope on a DHCP server.
Syntax
DWORD DhcpSetSuperScopeV4(
[in] DHCP_CONST WCHAR *ServerIpAddress,
[in] DHCP_CONST DHCP_IP_ADDRESS SubnetAddress,
[in, optional] DHCP_CONST LPWSTR SuperScopeName,
[in] DHCP_CONST BOOL ChangeExisting
);
Parameters
[in] ServerIpAddress
Pointer to a Unicode string that specifies the IP address or hostname of the DHCP server.
[in] SubnetAddress
DHCP_IP_ADDRESS value that contains the IP address of the subnet that will be defined as the superscope.
[in, optional] SuperScopeName
Pointer to a Unicode string that specifies the new name of the superscope.
[in] ChangeExisting
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.
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 |
---|---|
|
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. |
Remarks
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.
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 |