<div class="content"><p>The <b>RRouterInterfaceCreate</b> method creates an
interface on a specified RRAS server, <i>hDimServer</i>.<a id="Appendix_A_Target_261"></a><a aria-label="Product behavior note 261" href="3bb906f0-b077-47ab-ad11-d8d807afde26#Appendix_A_261" data-linktype="relative-path">&lt;261&gt;</a></p><dl>
<dd>
<div><pre> DWORD RRouterInterfaceCreate(
   [in] DIM_HANDLE hDimServer,
   [in] DWORD dwLevel,
   [in] PDIM_INFORMATION_CONTAINER pInfoStruct,
   [in, out] LPDWORD phInterface
 );
</pre></div>
</dd></dl><p><b>hDimServer: </b>A handle to the RRASM server where
the call is executed, see section <a href="1f8cdbcc-9791-4a35-ad78-878b8d110e15" data-linktype="relative-path">3.1.3</a>.</p><p><b>dwLevel: </b>This is of type <b>DWORD</b> and MUST
be set to any of the following values.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0</p>
  </td>
  <td>
  <p>The pInfoStruct-&gt;pBuffer MUST be set to point to a <a href="1c0f45b1-e5f4-4479-86cf-5f7753b4697c" data-linktype="relative-path"><b>MPRI_INTERFACE_0 (section 2.2.1.2.81)</b></a>. 
  </p>
  </td>
 </tr><tr>
  <td>
  <p>1</p>
  </td>
  <td>
  <p>The pInfoStruct-&gt;pBuffer MUST be set to point to a <a href="bb6d1b31-4515-44cd-9297-2768221d1397" data-linktype="relative-path"><b>MPRI_INTERFACE_1 (section 2.2.1.2.82)</b></a>. 
  </p>
  </td>
 </tr><tr>
  <td>
  <p>2</p>
  </td>
  <td>
  <p>The pInfoStruct-&gt;pBuffer MUST be set to point to a <a href="0b5fa6fc-b3f2-4a3f-9bfd-96963bfbb03d" data-linktype="relative-path"><b>MPRI_INTERFACE_2 (section 2.2.1.2.83)</b></a>. 
  </p>
  </td>
 </tr><tr>
  <td>
  <p>3</p>
  </td>
  <td>
  <p>The pInfoStruct-&gt;pBuffer MUST be set to point to a <a href="c73d2b22-5861-4d89-8878-1cec7e71ca37" data-linktype="relative-path"><b>MPRI_INTERFACE_3 (section 2.2.1.2.84)</b></a>. 
  </p>
  </td>
 </tr></tbody></table>
</dd></dl><p><b>pInfoStruct: </b>This is a pointer of type <a href="95609dbb-56aa-4b1b-a0e2-697864a141bd" data-linktype="relative-path"><b>DIM_INFORMATION_CONTAINER (section 2.2.1.2.1)</b></a>
and MUST be set to following, based on <i>dwLevel</i>.  </p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>dwLevel</p>
   </th>
   <th>
   <p>pInfoStruct-&gt;size</p>
   </th>
   <th>
   <p>pInfoStruct-&gt;pBuffer</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0</p>
  </td>
  <td>
  <p>This MUST be set to the size of <b>MPRI_INTERFACE_0 (section 2.2.1.2.81)</b>.
  Otherwise, an error is returned.  </p>
  </td>
  <td>
  <p>This MUST be set to point to MPRI_INTERFACE_0.</p>
  <p>Only the <b>wszInterfaceName</b>, <b>fEnabled</b>, and
  <b>dwIfType</b> fields of MPRI_INTERFACE_0 can be set. Setting other values
  has no effect.</p>
  </td>
 </tr><tr>
  <td>
  <p>1</p>
  </td>
  <td>
  <p>This MUST be set to the size of <b>MPRI_INTERFACE_1 (section 2.2.1.2.82)</b>.
  Otherwise, an error is returned.  </p>
  </td>
  <td>
  <p>This MUST be set to point to MPRI_INTERFACE_1.</p>
  <p>Only the <b>wszInterfaceName</b>, <b>fEnabled</b>, <b>dwIfType</b>
  fields of MPRI_INTERFACE_1 can be set. Setting other values has no effect.</p>
  </td>
 </tr><tr>
  <td>
  <p>2</p>
  </td>
  <td>
  <p>This MUST be set to the size of <b>MPRI_INTERFACE_2 (section 2.2.1.2.83)</b>.
  Otherwise, an error is returned.  </p>
  </td>
  <td>
  <p>This MUST be set to point to MPRI_INTERFACE_2.</p>
  <p>The <b>dwIfType</b> of MPRI_INTERFACE_2 SHOULD be set
  to ROUTER_IF_TYPE_FULL_ROUTER. The <b>szAlternates</b> of MPRI_INTERFACE_2
  MUST be set to 0.</p>
  </td>
 </tr><tr>
  <td>
  <p>3</p>
  </td>
  <td>
  <p>This MUST be set to the size of <b>MPRI_INTERFACE_3 (section 2.2.1.2.84)</b>.
  Otherwise, an error is returned.  </p>
  </td>
  <td>
  <p>This MUST be set to point to MPRI_INTERFACE_3.</p>
  <p>The <b>dwIfType</b> of MPRI_INTERFACE_3 SHOULD be set
  to ROUTER_IF_TYPE_FULL_ROUTER. The <b>szAlternates</b> of MPRI_INTERFACE_3
  MUST be set to 0. The values of the ipv6addrDns and ipv6addrDnsAlt members of
  the MPRI_INTERFACE_3 structure SHOULD be ignored by the server.</p>
  </td>
 </tr></tbody></table>
</dd>
<dd>
<p>If <b>dwIfType</b> is set to ROUTER_IF_TYPE_TUNNEL1
or ROUTER_IF_TYPE_DIALOUT in <b>MPRI_INTERFACE_0</b>, <b>MPRI_INTERFACE_1</b>, <b>MPRI_INTERFACE_2</b>,
or <b>MPRI_INTERFACE_3</b>, an error is returned.<a id="Appendix_A_Target_262"></a><a aria-label="Product behavior note 262" href="3bb906f0-b077-47ab-ad11-d8d807afde26#Appendix_A_262" data-linktype="relative-path">&lt;262&gt;</a></p>
</dd>
<dd>
<p>If <b>dwIfType</b> is set to
ROUTER_IF_TYPE_DEDICATED, ROUTER_IF_TYPE_INTERNAL, or ROUTER_IF_TYPE_LOOPBACK,
and if <b>fEnabled</b> is set to FALSE, an error other than one of the errors
specified in the table that follows MUST be returned.</p>
</dd>
<dd>
<p>If the <b>dwIfType</b> in <b>MPRI_INTERFACE_0</b>, <b>MPRI_INTERFACE_1</b>,
<b>MPRI_INTERFACE_2</b>, or <b>MPRI_INTERFACE_3</b>, is set to
ROUTER_IF_TYPE_CLIENT, ROUTER_IF_TYPE_HOME_ROUTER, or
ROUTER_IF_TYPE_FULL_ROUTER, and if the <b>RouterType</b> is ROUTER_TYPE_LAN, an
error SHOULD be returned. </p>
</dd>
<dd>
<p>If <b>dwIfType</b> in <b>MPRI_INTERFACE_0</b>
is set to ROUTER_IF_TYPE_FULL_ROUTER, phonebook information for the interface
MUST have already been configured in the <a href="fc2dfae9-0d04-4e1d-97c9-c51c2dc06c3b#gt_7653fbde-27ea-4593-bf47-46064b0a1c29" data-linktype="relative-path">phonebook file</a>. </p>
</dd>
<dd>
<p>If <b>dwLevel</b> is either 2 or 3
and none of the authentication protocol-related flags MPRIO_RequireMsCHAP2,
MPRIO_RequireCHAP, and MPRIO_RequireEAP are specified in the <b>dwfOptions</b>
member, then the <b>dwEncryptionType</b> member of the <b>MPRI_INTERFACE_2</b>
or <b>MPRI_INTERFACE_3</b> structures SHOULD be initialized to MPR_ET_Require
and the value of the <b>dwfOptions</b> member SHOULD be modified to enable the
following flags by default: </p>
</dd></dl><ul><li><p><span><span>  </span></span>MPRIO_RequireEncryptedPw</p>
</li><li><p><span><span>  </span></span>MPRIO_RequireDataEncryption</p>
</li><li><p><span><span>  </span></span>MPRIO_RequireCHAP</p>
</li><li><p><span><span>  </span></span>MPRIO_RequireMsCHAP2</p>
</li></ul><p><b>phInterface: </b>This is a pointer to a <b>DWORD</b>
that specifies the unique identifier of the interface that is created. This is
the same as the <b>dwInterface</b> in <b>MPRI_INTERFACE_0</b>, <b>MPRI_INTERFACE_1</b>,
<b>MPRI_INTERFACE_2</b>, or <b>MPRI_INTERFACE_3</b>. </p><p><b>Return Values: </b>A 32-bit, unsigned integer value
that indicates return status. A return value of ERROR_SUCCESS (0x00000000)
indicates that the operation was completed successfully; otherwise, it 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 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>
  <p>ERROR_SUCCESS</p>
  <p>0x00000000</p>
  </td>
  <td>
  <p>The call was successful.</p>
  </td>
 </tr><tr>
  <td>
  <p>ERROR_ACCESS_DENIED</p>
  <p>0x00000005</p>
  </td>
  <td>
  <p>The calling application does not have sufficient
  privileges, as specified in section <a href="9373431f-ed29-4639-9f8b-743267c9f9b6" data-linktype="relative-path">2.1.1.1</a>.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>The opnum field value for this method is 12.</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 <i>pInfoStruct</i> is NULL, return an error other than those
in the preceding table.</p>
</li><li><p><span><span> 
</span></span>If <i>dwLevel</i> is not supported, return an error other than
those in the preceding table.</p>
</li><li><p><span><span> 
</span></span>If the interface name of any entry in InterfaceList is the same
as <b>wszInterfaceName</b> specified as a part of MPRI_INTERFACE_0,
MPRI_INTERFACE_1, MPRI_INTERFACE_2, and MPRI_INTERFACE_3, 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 the RRAS server to
perform the required management task.</p>
</li><li><p><span><span> 
</span></span>If the RRAS server processes the request successfully, populate
the <i>phInterface</i> with the interface handle returned by the RRAS server,
add an interface entry to the InterfaceList comprising the interface name to be
the <b>wszInterfaceName</b> (present as a part of the MPRI_INTERFACE_0,
MPRI_INTERFACE_1, MPRI_INTERFACE_2, or MPRI_INTERFACE_3 structure) and the
interface handle to be the value filled in for <i>phInterface</i>. If <b>dwLevel</b>
value is specified as 2 or 3, add the <b>wszInterfaceName</b> specified as a
part of MPRI_INTERFACE_2 or MPRI_INTERFACE_3 into <b>PhonebookEntryNameList</b>
and return ERROR_SUCCESS.</p>
</li><li><p><span><span> 
</span></span>Otherwise return the error status that the RRAS server returned.</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>