<div class="content"><p>The <b>RRasAdminConnectionEnumEx</b> method<a id="Appendix_A_Target_320"></a><a aria-label="Product behavior note 320" href="3bb906f0-b077-47ab-ad11-d8d807afde26#Appendix_A_320" data-linktype="relative-path">&lt;320&gt;</a> retrieves the list of all
active connections for a specified RRAS server using handle <i>hDimServer</i>.
The caller SHOULD free the memory pointed to by <i>pRasConections</i>.</p><dl>
<dd>
<div><pre> DWORD RRasAdminConnectionEnumEx(
   [in] DIM_HANDLE hDimServer,
   [in] PMPRAPI_OBJECT_HEADER_IDL objectHeader,
   [in] DWORD dwPreferedMaxLen,
   [out] LPDWORD lpdwEntriesRead,
   [out] LPDWORD lpdNumTotalElements,
   [out, size_is(,*lpdwEntriesRead)] 
     PRAS_CONNECTION_EX_IDL* pRasConections,
   [in, out, unique] LPDWORD lpdwResumeHandle
 );
</pre></div>
</dd></dl><p><b>hDimServer: </b>The 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>objectHeader: </b>The pointer to an
MPRAPI_OBJECT_HEADER_IDL structure (section <a href="abab767e-8f43-40c6-bb13-ff65307f05ef" data-linktype="relative-path">2.2.1.2.129</a>). In the
structure, the <b>revision</b> field MUST be <b>MPRAPI_RAS_CONNECTION_OBJECT_REVISION_1</b>,
type filed MUST be <b>MPRAPI_OBJECT_TYPE_RAS_CONNECTION_OBJECT</b>, and size
MUST be size of <a href="244bfb40-58d4-416f-a883-382e763fe609" data-linktype="relative-path"><b>RAS_CONNECTION_EX_IDL</b></a>.
</p><p><b>dwPreferedMaxLen: </b>This parameter is of type <a href="../ms-dtyp/262627d8-3418-4627-9218-4ffe110850b2" data-linktype="relative-path">DWORD</a>
and SHOULD specify the preferred maximum length of returned data (<i>pRasConections</i>)
in bytes. If <i>dwPreferedMaxLen</i> is -1, the buffer returned is large enough
to hold all available information. The number of entries returned is zero (0)
in the case that <i>dwPreferedMaxLen</i> is less than the size of one item;
otherwise, the number of entries returned is one more than what could be
accommodated in <i>dwPreferedMaxLen</i> bytes.</p><p><b>lpdwEntriesRead: </b>This is a pointer to type
DWORD. Upon a successful function call return, this parameter determines the
total number of connections enumerated from the current resume position given
by lpdwResumeHandle.</p><p><b>lpdNumTotalElements: </b>This is a pointer to type
DWORD and receives the total number of connections that could have been
enumerated from the current resume position given by lpdwResumeHandle.</p><p><b>pRasConections: </b>Upon successful return, this
is a pointer array of  <span><b>RAS_CONNECTION_EX_IDL</b> (section </span>2.2.1.2.134)
structures and the array size is determined by value pointed to by <b>lpdwEntriesRead</b>.</p><p><b>lpdwResumeHandle: </b>This is a pointer to type
DWORD and specifies a resume handle used to continue the enumeration. The
lpdwResumeHandle parameter is NULL on the first call and left unchanged on
subsequent calls (caller MUST pass the same returned value in the next call to
this function). If the return code is ERROR_MORE_DATA, another call MAY be made
using this handle to retrieve more data. If the handle is NULL upon return, the
enumeration is complete. This handle is invalid for other types of error
returns.</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 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 of the data was returned with this call. To
  obtain additional data, call the function again using the resume handle.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>The opnum field value for this method is 45.</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>RouterType</i> is ROUTER_TYPE_LAN, 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 successfully processes the request, populate <i>pRasConections</i>
with information about the active connections returned by the RRAS server. For
successful processing, the <i>lpdwEntriesRead</i>, <i>lpdwNumTotalElements</i>,
and <i>lpdwResumeHandle</i> will be filled with the values returned by the RRAS
server. If there are more entries to be enumerated, the RRAS implementation
MUST return ERROR_MORE_DATA. If all the entries have been enumerated, the RRAS
implementation MUST return ERROR_SUCCESS (0x00000000).</p>
</li><li><p><span><span> 
</span></span>Otherwise, return the failure error status that is returned 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>