<div class="content"><p>The <b>RRouterInterfaceGetCredentialsEx</b> method<a id="Appendix_A_Target_313"></a><a aria-label="Product behavior note 313" href="3bb906f0-b077-47ab-ad11-d8d807afde26#Appendix_A_313" data-linktype="relative-path">&lt;313&gt;</a> is used to retrieve extended
(other than the username or password) <a href="fc2dfae9-0d04-4e1d-97c9-c51c2dc06c3b#gt_b505ab37-868d-426c-bb19-af21e675e0b8" data-linktype="relative-path">credentials</a> information for
the specified interface.</p><dl>
<dd>
<div><pre> DWORD RRouterInterfaceGetCredentialsEx(
   [in] DIM_HANDLE hDimServer,
   [in] DWORD dwLevel,
   [in, out] PDIM_INFORMATION_CONTAINER pInfoStruct,
   [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>dwLevel: </b>Specifies the format of credentials
information. This parameter takes values 0x00000000, 0x00000001, 0x00000002, or
0x00000003. An error other than one of the errors in the return values table is
returned for other values. A value of 0x00000000 indicates that the credentials
information is about the <a href="fc2dfae9-0d04-4e1d-97c9-c51c2dc06c3b#gt_5de8ef80-3a1d-4ec8-bf8c-321972e06eae" data-linktype="relative-path">EAP</a>
configuration. If the interface does not have EAP information, the <b>dwSize</b>
field of the <span><b>MPR_CREDENTIALSEX_1</b></span> (section
<a href="4d686ea2-6d99-4c95-b839-30c1f99521e0" data-linktype="relative-path">2.2.1.2.87</a>)structure
MUST be set to zero (0). Otherwise, the <b>MPR_CREDENTIALSEX_1</b> structure
MUST contain <a href="37235430-8381-499c-99d8-d55219a36785" data-linktype="relative-path"><b>EAPTLS_USER_PROPERTIES (section 2.2.1.2.128)</b></a>.
A value of 0x00000001, 0x00000002, or 0x00000003 indicates that the credentials
information is a preshared key. If the interface does not have a preshared key
configured, an error other than one of the errors in the return values table is
returned. Otherwise, the preshared key is formatted as an <b>MPR_CREDENTIALSEX_1</b>
structure. </p><p><b>pInfoStruct: </b>Pointer to a <b>MPR_CREDENTIALSEX_1</b>
structure that contains the preshared key or EAP information for the interface.
When the method completes successfully, the client SHOULD free this memory. </p><p><b>hInterface: </b>A handle to the interface. This
can be obtained from <a href="72bead5c-821f-4e98-bacd-0de279552379" data-linktype="relative-path"><b>RRouterInterfaceCreate (section 3.1.4.13)</b></a>
or <a href="b4cc4f8f-e2bc-4e8f-a521-08a0558d3e44" data-linktype="relative-path"><b>RRouterInterfaceGetHandle (section 3.1.4.12)</b></a>.
The interface MUST be of type ROUTER_IF_TYPE_FULL_ROUTER if <b>dwLevel</b> is
0x00000000. </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 41.</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>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>Return any error the RRAS server returns while processing the
request. 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>