<div class="content" name="RRouterInterfaceDelete" uuid="8db3d54b-f4f4-4b7c-b08c-a65e040641f3"><p>The <b>RRouterInterfaceDelete</b> method<a id="Appendix_A_Target_266"></a><a aria-label="Product behavior note 266" href="3bb906f0-b077-47ab-ad11-d8d807afde26#Appendix_A_266" data-linktype="relative-path">&lt;266&gt;</a> deletes an interface on a specified
server. The interface MUST have been created with the <a href="72bead5c-821f-4e98-bacd-0de279552379" data-linktype="relative-path"><b>RRouterInterfaceCreate (section 3.1.4.13)</b></a>
method.  </p><dl>
<dd>
<div><pre> DWORD RRouterInterfaceDelete(
   [in] DIM_HANDLE hDimServer,
   [in] DWORD hInterface
 );
</pre></div>
</dd></dl><p><b>hDimServer: </b>A handle to the RRASM server where
the call is to be executed, see section <a href="1f8cdbcc-9791-4a35-ad78-878b8d110e15" data-linktype="relative-path">3.1.3</a>.</p><p><b>hInterface: </b>A unique identifier of an
interface. This can be obtained from <b>RRouterInterfaceCreate</b> or <a href="b4cc4f8f-e2bc-4e8f-a521-08a0558d3e44" data-linktype="relative-path"><b>RRouterInterfaceGetHandle (section 3.1.4.12)</b></a>.
Because the RRASM server does not maintain the interface handles, the RRAS
server SHOULD check to ensure that this handle is a valid interface handle.  </p><p><b>Return Values: </b>A 32-bit, unsigned integer
value that indicates the return status. A return value of ERROR_SUCCESS
(0x00000000) indicates that the operation was completed successfully;
otherwise, the value contains an error code, as specified in <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>
or in section <a href="5c0c991a-0d3d-4fe5-9503-5128d0d49fe1" data-linktype="relative-path">2.2.4</a>.
All values that are not listed in the table that follows MUST be treated the
same by the RRASM client. </p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>ERROR_SUCCESS 0x00000000</td>
  <td>The call was successful.</td>
 </tr><tr>
  <td>ERROR_ACCESS_DENIED 0x00000005</td>
  <td>The calling application does not have sufficient privileges, as specified in section 2.1.1.1.</td>
 </tr><tr>
  <td>ERROR_INTERFACE_CONNECTED 0x0000038C</td>
  <td>The interface is connected and therefore cannot be deleted. This error is returned if the interface is of type ROUTER_IF_TYPE_CLIENT, ROUTER_IF_TYPE_HOME_ROUTER, or ROUTER_IF_TYPE_FULL_ROUTER.</td>
 </tr></tbody></table>
</dd></dl><p>The opnum field value for this method is 15.</p><p>When processing this call, the RRASM server MUST do the
following:</p><ul><li><p><span><span> 
</span></span>Validate, as specified in section 2.1.1.1, whether this method
was called by a client that has access to the method. If the client does not
have access, then return error ERROR_ACCESS_DENIED (0x00000005).</p>
</li><li><p><span><span> 
</span></span>If the interface is of type ROUTER_IF_TYPE_CLIENT,
ROUTER_IF_TYPE_HOME_ROUTER, or ROUTER_IF_TYPE_FULL_ROUTER, and if the interface
is not connected, the RRAS implementation MUST return ERROR_INTERFACE_CONNECTED
(0x0000038C).</p>
</li><li><p><span><span> 
</span></span>If the <i>hInterface</i> value specified is not associated with
an interface entry in <b>InterfaceList</b> that has a matching interface handle
(value being the same), return an error other than one of the errors specified
in the preceding table.</p>
</li><li><p><span><span> 
</span></span>Call the abstract interface <b>Invoke DIMSVC</b> method
specifying the operation and the parameters to enable RRAS server to perform
the required management task.</p>
</li><li><p><span><span> 
</span></span>If the RRAS server returns successfully removing the interface
context from its runtime configuration settings, and if the interface is
ROUTER_IF_TYPE_FULL_ROUTER, get the interface name present in the interface
entry (from the <b>InterfaceList</b>) that has the same interface handle as <i>hInterface</i>,
remove the phone book entry with the specified interface name, and remove the
interface name from <b>PhonebookEntryNameList</b>. Remove the interface entry
from the <b>InterfaceList</b> to complete the removal of the interface.</p>
</li><li><p><span><span> 
</span></span>Return any error status provided by the RRAS server. Otherwise
return ERROR_SUCCESS (0x00000000).</p>
</li></ul><p>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>