<div class="content" name="R_DhcpDeleteClassV6" uuid="93395476-a0d9-4a28-9f11-c3583f91fd86"><p>The <b>R_DhcpDeleteClassV6</b> method deletes the specified
IPv6 user class or vendor class definition from the DHCPv6 server.</p><dl>
<dd>
<div><pre> DWORD R_DhcpDeleteClassV6(
   [in, unique, string] DHCP_SRV_HANDLE ServerIpAddress,
   [in] DWORD ReservedMustBeZero,
   [in, string, unique] WCHAR* ClassName
 );
</pre></div>
</dd></dl><p><b>ServerIpAddress: </b>The IP address/host name of
the DHCP server. This parameter is unused.</p><p><b>ReservedMustBeZero: </b>This is of type <a href="../ms-dtyp/262627d8-3418-4627-9218-4ffe110850b2" data-linktype="relative-path">DWORD</a>
and SHOULD be set to 0. Currently it is not used, and any value set to this
parameter will not affect the behavior of this method.</p><p><b>ClassName: </b>This is a pointer to <a href="../ms-dtyp/7df7c1d5-492c-4db4-a992-5cd9e887c5d7" data-linktype="relative-path">WCHAR</a>
that contains the name of the class that needs to be deleted.</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>0x00004E2D ERROR_DHCP_JET_ERROR</td>
  <td>An error occurred while accessing the DHCP server database.</td>
 </tr><tr>
  <td>0x00004E4C ERROR_DHCP_CLASS_NOT_FOUND</td>
  <td>The specified class is not defined in the DHCP server.</td>
 </tr></tbody></table>
</dd></dl><p>The opnum field value for this method is 76.</p><p>When processing this call, the DHCP server MUST do the
following:</p><ul><li><p><span><span> 
</span></span>If <b>ClassName</b> is NULL, return <i>ERROR_INVALID_PARAMETER</i>.</p>
</li><li><p><span><span> 
</span></span>Validate if this method is authorized for read/write access per
section <a href="38840bd0-0a5a-47ed-bc69-0dd870d33aec" data-linktype="relative-path">3.5.5</a>. If not,
return the error ERROR_ACCESS_DENIED.</p>
</li><li><p><span><span> 
</span></span>Retrieve the <b>DHCPv6ClassDefList</b> object. If the <b>DHCPv6ClassDef</b>
object indicated by <b>ClassInfo</b> is not in <b>DHCPv6ClassDefList</b>,
return ERROR_DHCP_CLASS_NOT_FOUND.</p>
</li><li><p><span><span> 
</span></span>Delete the <b>DHCPv6ClassDef</b> object found from <b>DHCPv6ClassDefList</b>.</p>
</li><li><p><span><span> 
</span></span>Delete the <b>DHCPv6OptionDef</b> objects from <b>DHCPv6ClassedOptionDefList.DHCPv6ClassedOptionDef.DHCPv6OptionDefList</b>
for all the <b>DHCPv6ClassedOptionDef</b> objects that have <b>ClassName</b> as
either their <b>DHCPv6UserClass</b> or <b>DHCPv6VendorClass</b>.</p>
</li><li><p><span><span> 
</span></span>Delete the <b>DHCPv6OptionValue</b> objects from <b>DHCPv6ServerClassedOptValueList.DHCPv6ClassedOptValue.DHCPv6OptionValueList</b>
for all the <b>DHCPv6ClassedOptionDef</b> objects that have <b>ClassName</b> as
either their <b>DHCPv6UserClass</b> or <b>DHCPv6VendorClass</b>. Delete the <b>DHCPv6OptionValue</b>
objects from <b>DHCPv6Scope.DHCPv6ScopeClassedOptValueList.DHCPv6ClassedOptValue.DHCPv6OptionValueList</b>,
for all <b>DHCPv6Scope</b> objects and for all the <b>DHCPv6ClassedOptionDef</b>
objects that have <b>ClassName</b> as either their <b>DHCPv6UserClass</b> or <b>DHCPv6VendorClass</b>.
Delete the <b>DHCPv6OptionValue</b> objects from <b>DHCPv6Reservation.DHCPv6ResvClassedOptValueList.DHCPv6ClassedOptValue.DHCPv6OptionValueList</b>,
for all <b>DHCPv6Reservation</b> objects and for all the <b>DHCPv6ClassedOptionDef</b>
objects that have <b>ClassName</b> as either their <b>DHCPv6UserClass</b> or <b>DHCPv6VendorClass</b>.</p>
</li></ul><p><b>Exceptions Thrown:</b> No exceptions are thrown beyond
those thrown by the underlying RPC protocol <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>.</p></div>