The R_DhcpSetMScopeInfo method creates/modifies an IPv4 multicast subnet on the MADCAP server. The behavior of this method is dependent on parameter NewScope.

 DWORD R_DhcpSetMScopeInfo(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in, ref, string] LPWSTR* MScopeName,
   [in, ref] LPDHCP_MSCOPE_INFO MScopeInfo,
   [in] BOOL NewScope
 );

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 that has to be created or modified. The size of the name is limited to MAX_PATH, including the terminating NULL character. MAX_PATH is defined as 260 characters.

MScopeInfo: This is a pointer of type LPDHCP_MSCOPE_INFO (section 2.2.1.2.71), providing the IPv4 multicast subnet information that is to be created or modified.

NewScope: This is of type BOOL. A TRUE value indicates that the IPv4 multicast subnet needs to be created, and a FALSE value indicates that the existing IPv4 multicast subnet needs to be modified.

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.

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.

0x00004E4E

ERROR_DHCP_SCOPE_NAME_TOO_LONG

The specified scope name is too long. The name is limited to a maximum of 256 characters.

0x00004E24

ERROR_DHCP_SUBNET_EXISTS

The specified IPv4 multicast subnet already exists.

0x00004E55

ERROR_DHCP_MSCOPE_EXISTS

The multicast scope parameters are incorrect. Either the scope already exists or its properties are inconsistent with the properties of another existing scope.

The opnum field value for this method is 1.

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].