The R_DhcpAddMScopeElement method adds an IPv4 multicast subnet element (IPv4 range or IPv4 exclusion range) to the IPv4 multicast subnet in the MADCAP server.

 DWORD R_DhcpAddMScopeElement(
     [in, unique, string]  DHCP_SRV_HANDLE ServerIpAddress,
     [in, ref, string]    LPWSTR *MScopeName,
     [in, ref] LPDHCP_SUBNET_ELEMENT_DATA_V4 AddElementInfo
 );

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 IPv4 multicast subnet in which the element is added. There is no restriction on the length of this parameter.

AddElementInfo: This is a pointer to a DHCP_SUBNET_ELEMENT_DATA_V4 (section 2.2.1.2.35) structure that contains the IPv4 multicast subnet element that needs to be added to the IPv4 multicast subnet.

Return Values: A 32-bit unsigned integer value that indicates return status. A return value of 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.

0x00004E25

ERROR_DHCP_SUBNET_NOT_PRESENT

The specified IPv4 subnet does not exist.

0x00004E2D

ERROR_DHCP_JET_ERROR

An error occurred while accessing the MADCAP server database.

0x00004E37

ERROR_DHCP_INVALID_RANGE

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

0x00004E56

ERROR_MSCOPE_RANGE_TOO_SMALL

The multicast scope range MUST have at least 256 IPv4 addresses.

0x00004E35

ERROR_DHCP_IPRANGE_EXITS

The specified multicast range already exists.

The opnum field value for this method is 4.

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 specified in [MS-RPCE].