<div class="content"><p>The <b>RRasAdminConnectionEnum</b> method retrieves the list
of active <a href="fc2dfae9-0d04-4e1d-97c9-c51c2dc06c3b#gt_866b0055-ceba-4acf-a692-98452943b981" data-linktype="relative-path">connections</a>
for a specified RRASM server identified by the handle <i>hDimServer</i>. The <i>dwLevel</i>
specifies 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).
After the function returns, the caller SHOULD free the memory pointed to by <b>pInfoStruct</b>. 
</p><dl>
<dd>
<div><pre> DWORD RRasAdminConnectionEnum(
   [in] DIM_HANDLE hDimServer,
   [in] DWORD dwLevel,
   [in, out] PDIM_INFORMATION_CONTAINER pInfoStruct,
   [in] DWORD dwPreferedMaximumLength,
   [out] LPDWORD lpdwEntriesRead,
   [out] LPDWORD lpdwTotalEntries,
   [in, out, unique] LPDWORD lpdwResumeHandle
 );
</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
SHOULD 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>
  <p>0</p>
  </td>
  <td>
  <p>After the function returns, the memory pointed to by
  pInfoStruct-&gt;pBuffer is interpreted as an array of <a href="e979f770-cb84-426a-9b43-1ce5eec2d169" data-linktype="relative-path"><b>RASI_CONNECTION_0 (section 2.2.1.2.77)</b></a>.
  The size of the array is determined by <i>lpdwEntriesRead</i>.  </p>
  </td>
 </tr><tr>
  <td>
  <p>1</p>
  </td>
  <td>
  <p>After the function returns, the memory pointed to by
  pInfoStruct-&gt;pBuffer is interpreted as an array of <a href="617795bc-29d6-4698-bbaf-2e07bc34bd61" data-linktype="relative-path"><b>RASI_CONNECTION_1 (section 2.2.1.2.78)</b></a>.
  The size of the array is determined by <i>lpdwEntriesRead</i>.  </p>
  </td>
 </tr><tr>
  <td>
  <p>2</p>
  </td>
  <td>
  <p>After the function returns, the memory pointed to by
  pInfoStruct-&gt;pBuffer is interpreted as an array of <a href="9a183ab0-5b55-4be5-baea-25b1357a62bb" data-linktype="relative-path"><b>RASI_CONNECTION_2 (section 2.2.1.2.79)</b></a>.
  The size of the array is determined by <i>lpdwEntriesRead</i>.  </p>
  </td>
 </tr><tr>
  <td>
  <p>3</p>
  </td>
  <td>
  <p>After the function returns, the memory pointed to by
  pInfoStruct-&gt;pBuffer is interpreted as an array of <a href="9b17d836-13c1-4772-b1fa-24c74fae1918" data-linktype="relative-path"><b>RASI_CONNECTION_3 (section 2.2.1.2.80)</b></a>).The
  size of the array is determined by <i>lpdwEntriesRead</i>.  </p>
  </td>
 </tr><tr>
  <td>
  <p>4</p>
  </td>
  <td>
  <p>After the function returns, the memory pointed to by
  pInfoStruct-&gt;pBuffer is interpreted as an array of <b>RAS_CONNECTION_4_IDL</b> (section
  <a href="22701f4b-672e-4366-ad03-d9c786e68ba2" data-linktype="relative-path">2.2.1.2.236)</a>. The
  size of the array is determined by lpdwEntriesRead.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p><b>pInfoStruct: </b>This is a pointer of type <b>DIM_INFORMATION_CONTAINER</b>,
and DIM_INFORMATION_CONTAINER.dwBufferSize is initialized to zero (0). Upon
successful return, the pInfoStruct-&gt;pBuffer is a typecast array of <b>RASI_CONNECTION_0</b>,
<b>RASI_CONNECTION_1</b>, <b>RASI_CONNECTION_2</b>, <b>RASI_CONNECTION_3</b>,<a id="Appendix_A_Target_253"></a><a aria-label="Product behavior note 253" href="3bb906f0-b077-47ab-ad11-d8d807afde26#Appendix_A_253" data-linktype="relative-path">&lt;253&gt;</a> or <b>RAS_CONNECTION_4_IDL</b>
based on the <i>dwLevel</i> value. The array size is determined by the value in
memory pointed to by <i>lpdwEntriesRead</i>.</p><p><b>dwPreferedMaximumLength: </b>This is of type <b>DWORD</b>
and SHOULD specify the preferred maximum length of the returned data
(pInfoStruct-&gt;pBuffer) in bytes.</p><p><b>lpdwEntriesRead: </b>This is a pointer to type <b>DWORD</b>
and upon a successful function-call return specifies the total number of
connections enumerated from the current resume position given by <i>lpdwResumeHandle</i>.</p><p><b>lpdwTotalEntries: </b>This is a pointer to type <b>DWORD</b>
and receives the total number of connections that could have been enumerated
from the current resume position given by <i>lpdwResumeHandle</i>.</p><p><b>lpdwResumeHandle: </b>This is a pointer to type <b>DWORD</b>
and specifies a resume handle that is used to continue the enumeration. The <i>lpdwResumeHandle</i>
parameter is zero (0) on the first call and left unchanged on subsequent calls.
The caller MUST pass the same returned value in the next call to this function;
otherwise, an error is returned. If the return code is ERROR_MORE_DATA, another
call can be made using this handle to retrieve more data. If the return code is
not ERROR_MORE_DATA, the handle returned SHOULD be ignored. A return value of
ERROR_SUCCESS indicates a successful completion of the enumeration. Any return
value other than ERROR_SUCCESS or ERROR_MORE_DATA indicates the failure of the
enumeration.</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 return 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 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><tr>
  <td>
  <p>ERROR_MORE_DATA</p>
  <p>0x000000EA</p>
  </td>
  <td>
  <p>Not all the data was returned with this call. To
  obtain additional data, call the function again using the handle that was
  returned in the <i>lpdwResumeHandle</i> parameter.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>The opnum field value for this method is 1.</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 <a href="bacd0fa5-aabf-452b-9bb9-0a29a1dd8238" data-linktype="relative-path"><b>RouterType (section 2.2.3.4.1)</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 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 information returned by RRAS server in <i>pInfoStruct</i>, along with <i>lpdwEntriesRead</i>,
<i>lpdwTotalEntries</i>, and <i>lpdwResumeHandle</i>, and return ERROR_SUCCESS
(0x00000000).</p>
</li><li><p><span><span> 
</span></span>Otherwise return the failure error that the RRAS server returns.</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>