<div class="content" name="R_DhcpGetMScopeInfo" uuid="9e2566c4-5380-4b5e-a734-624ac18a5aad"><p>The <b>R_DhcpGetMScopeInfo</b> method retrieves the
information of the IPv4 multicast subnet managed by the MADCAP server. The
caller of this function can free the memory pointed by <i>MScopeInfo</i> by
calling the function <b>midl_user_free</b> (section <a href="a7e5f2d1-04b7-4363-bdc0-76a1099664eb" data-linktype="relative-path">3</a>).</p><dl>
<dd>
<div><pre> DWORD R_DhcpGetMScopeInfo(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in, ref, string] LPWSTR* MScopeName,
   [out] LPDHCP_MSCOPE_INFO* MScopeInfo
 );
</pre></div>
</dd></dl><p><b>ServerIpAddress: </b>The IP address/host name of
the MADCAP server. This parameter is unused.</p><p><b>MScopeName: </b>This is a pointer to a Unicode
string that contains the name of the IPv4 multicast subnet for which the
information is retrieved. There is no restriction on the length of this field.</p><p><b>MScopeInfo: </b>This is a pointer of type <a href="d4d52cd0-a5ff-458e-9864-2f78ba2bc230" data-linktype="relative-path">LPDHCP_MSCOPE_INFO (section 2.2.1.2.71)</a>
in which the information for the IPv4 multicast subnet corresponding to <i>MScopeName</i>
is retrieved.</p><p><b>Return Values: </b>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 <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>.
This error code value can correspond to a DHCP-specific failure, which takes a
value between 20000 and 20099, or any generic failure.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x00000000 ERROR_SUCCESS</td>
  <td>The call was successful.</td>
 </tr><tr>
  <td>0x00004E25 ERROR_DHCP_SUBNET_NOT_PRESENT</td>
  <td>The specified IPv4 subnet does not exist.</td>
 </tr></tbody></table>
</dd></dl><p>The opnum field value for this method is 2.</p><p>When processing this call, the MADCAP server MUST do the
following:</p><ul><li><p><span><span> 
</span></span>Validate if this method is authorized for read access per section
<a href="baec2112-1146-4c42-b77e-b706e170a590" data-linktype="relative-path">3.5.4</a>. If not, return
ERROR_ACCESS_DENIED.</p>
</li><li><p><span><span> 
</span></span>Validate the <i>MScopeName</i> input variable. If this is NULL,
return ERROR_INVALID_PARAMETER.</p>
</li><li><p><span><span> 
</span></span>Allocate memory to <i>MScopeInfo</i> equal to the size of type <b>DHCP_MSCOPE_INFO</b>.</p>
</li><li><p><span><span> 
</span></span>Retrieve the <b>DHCPv4MScope</b> entry corresponding to the <i>MScopeName</i>
from the server ADM element <b>DHCPv4MScopesList</b>.</p>
</li><li><p><span><span> 
</span></span>If the <b>DHCPv4MScope</b> entry corresponding to <i>MScopeName</i>
is not found, free the memory allocated to <i>MScopeInfo</i> and return
ERROR_DHCP_SUBNET_NOT_PRESENT.</p>
</li><li><p><span><span> 
</span></span>Copy the information in <b>DHCPv4MScope.MScopeInfo</b> into the <i>MScopeInfo</i>
structure, and return it to the caller.</p>
</li></ul><p><b>Exceptions Thrown:</b> No exceptions SHOULD be thrown
beyond those thrown by the underlying RPC protocol specified in <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>.</p></div>