<div class="content" name="RRasAdminConnectionGetInfo" uuid="cb8a4769-8b8c-4c33-84f2-d3418162599f"><p>The <b>RRasAdminConnectionGetInfo</b> method retrieves the
connection information for a particular connection identified by the passed
handle of the connection given in <i>hDimConnection</i>. The RRAS server is
identified by the server handle passed in <i>hDimServer</i>. The <i>dwLevel</i>
defines the type of information requested. The caller MUST pass a pointer to a
valid <a href="95609dbb-56aa-4b1b-a0e2-697864a141bd" data-linktype="relative-path"><b>DIM_INFORMATION_CONTAINER (section 2.2.1.2.1)</b></a>,
where <b>DIM_INFORMATION_CONTAINER.dwBufferSize</b> is initialized to zero (0).
The caller SHOULD free the memory pointed to by <i>pInfoStruct</i>.  </p><dl>
<dd>
<div><pre> DWORD RRasAdminConnectionGetInfo(
   [in] DIM_HANDLE hDimServer,
   [in] DWORD dwLevel,
   [in] DWORD hDimConnection,
   [out] PDIM_INFORMATION_CONTAINER pInfoStruct
 );
</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 one 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>0</td>
  <td>After the function returns, the memory pointed to by pInfoStruct-&gt;pBuffer is interpreted as RASI_CONNECTION_0 (section 2.2.1.2.77).</td>
 </tr><tr>
  <td>1</td>
  <td>After the function returns, the memory pointed to by pInfoStruct-&gt;pBuffer is interpreted as RASI_CONNECTION_1 (section 2.2.1.2.78).</td>
 </tr><tr>
  <td>2</td>
  <td>After the function returns, the memory pointed to by pInfoStruct-&gt;pBuffer is interpreted as an array of RASI_CONNECTION_2 (section 2.2.1.2.79) structures.</td>
 </tr><tr>
  <td>3</td>
  <td>After the function returns, the memory pointed to by pInfoStruct-&gt;pBuffer is interpreted as RASI_CONNECTION_3 (section 2.2.1.2.80).</td>
 </tr></tbody></table>
</dd></dl><p><b>hDimConnection: </b>This is of type <b>DWORD</b>
and SHOULD be set to a particular connection identifier for which the
connection information is required. Obtain this handle by calling <a href="023913fc-f438-47c9-a52b-6e45e0190c6c" data-linktype="relative-path"><b>RRasAdminConnectionEnum (section 3.1.4.2)</b></a>.
Since RRASM server does not maintain connection handle information, the
validation of this handle SHOULD be done by the RRAS server implementation.  </p><p><b>pInfoStruct: </b>This is a pointer of type <b>DIM_INFORMATION_CONTAINER</b>,
and <b>DIM_INFORMATION_CONTAINER.dwBufferSize</b> is initialized to zero (0).
Upon successful return, the pInfoStruct-&gt;pBuffer is a cast to an array of <b>RASI_CONNECTION_0</b>,
<b>RASI_CONNECTION_1</b>, <b>RASI_CONNECTION_2</b>, or <b>RASI_CONNECTION_3</b>
structures, based on the <i>dwLevel</i> value.</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, 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 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>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></tbody></table>
</dd></dl><p>The opnum field value for this method is 2.</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 not, then return error
ERROR_ACCESS_DENIED (0x00000005).</p>
</li><li><p><span><span> 
</span></span>If the <a href="bacd0fa5-aabf-452b-9bb9-0a29a1dd8238" data-linktype="relative-path"><b>RouterType</b></a>
is ROUTER_TYPE_LAN, return an error other than those in the preceding table.</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>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 successfully processes the request, populate
the <i>pInfoStruct</i> with the information returned by the RRAS server and
return ERROR_SUCCESS.</p>
</li><li><p><span><span> 
</span></span>Otherwise return the error provided by the RRAS server.</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>