The R_DhcpRemoveMScopeElement method removes an IPv4 multicast subnet element (IPv4 multicast range or IPv4 exclusion range) from the IPv4 multicast subnet defined on the MADCAP server.

 DWORD R_DhcpRemoveMScopeElement(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in, ref, string] LPWSTR* MScopeName,
   [in, ref] LPDHCP_SUBNET_ELEMENT_DATA_V4 RemoveElementInfo,
   [in] DHCP_FORCE_FLAG ForceFlag
 );

ServerIpAddress: The IP address/host name of the MADCAP server. This parameter is unused.

MScopeName: This is a pointer to a Unicode string that contains the name of the multicast subnet from which the IPv4 multicast subnet element is removed. There is no restriction on the length of this field.

RemoveElementInfo: This is of type DHCP_SUBNET_ELEMENT_DATA_V4 (section 2.2.1.2.35), containing the IPv4 multicast subnet element that needs to be removed from the IPv4 multicast subnet.

ForceFlag: This is of type DHCP_FORCE_FLAG (section 2.2.1.1.9) that defines the behavior of this method. If the flag is set to DhcpNoForce and this IPv4 multicast subnet has served the IPv4 address to some MADCAP clients, the IPv4 multicast subnet is not deleted. If the flag is set to DhcpFullForce, the IPv4 multicast subnet is deleted along with the MADCAP client lease record on the MADCAP server.

Return Values: A 32-bit unsigned integer value that indicates return status. A return value ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully, else it contains a Win32 error code, as specified in [MS-ERREF]. This error code value can correspond to a DHCP-specific failure, which takes a value between 20000 and 20099, or any generic failure.

Return value/code

Description

0x00000000

ERROR_SUCCESS

The call was successful.

0x00004E27

ERROR_DHCP_ELEMENT_CANT_REMOVE

  • The specified IPv4 multicast subnet element cannot be removed because at least one multicast IPv4 address has been leased out to a MADCAP client.

  • The starting address of the specified Multicast exclusion range is not part of any multicast exclusion range configured on the server.

  • There is an error in deleting the exclusion range from the database.

0x00004E2D

ERROR_DHCP_JET_ERROR

An error occurred while accessing the MADCAP server database.

0x00004E37

ERROR_DHCP_INVALID_RANGE

The specified IPv4 range either overlaps an existing IPv4 range or is not valid.

The opnum field value for this method is 6.

When processing this call, the MADCAP server MUST do the following:

Exceptions Thrown: No exceptions SHOULD be thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].