MprAdminConnectionEnum

[This is preliminary documentation and subject to change.]

The MprAdminConnectionEnum function enumerates all active connections.

DWORD MprAdminConnectionEnum(
  RAS_SERVER_HANDLE hRasServer,       // handle to the server
  DWORD             dwLevel,          // must be zero
  LPBYTE *          lplpbBuffer,      // pointer to array of connection structs
  DWORD             dwPrefMaxLen,     // maximum preferred length of returned data
  DWORD             lpdwEntriesRead,  // number of connections enumerated
  DWORD             lpdwTotalEntries, // number of connections that could've been enumerated
  LPDWORD           lpdwResumeHandle  // handle with which to resume enumeration 
);
 

Parameters

hRasServer
Handle to the Remote Access Server on which connections will be enumerated. This handle is obtained from a previous call to MprAdminServerConnect.
dwLevel
This parameter must be zero.
lplpbBuffer
Upon successful execution, lplpbBuffer will point to an array of RAS_CONNECTION_0 structures. Free this memory by calling MprAdminBufferFree.
dwPrefMaxLen
Preferred maximum length of returned data (in 8-bit bytes). If dwPrefMaxLen is -1, the buffer returned will be large enough to hold all available information.
lpdwEntriesRead
Pointer to a DWORD variable. Upon successful return, this variable contains the total number of connections enumerated from the current resume position.
lpdwTotalEntries
Pointer to a DWORD variable. Upon successful return, this variable contains the total number of connections that could have been enumerated from the current resume position.
lpdwResumeHandle
Pointer to a DWORD variable. Upon successful return, this variable contains a resume handle that can be used to continue the enumeration. The lpdwResumeHandle parameter should be zero on the first call, and left unchanged on subsequent calls. If the return code is ERROR_MORE_DATA, the call may be re-issued with this handle to retrieve more data. If the handle is NULL upon return, the enumeration cannot be continued. This handle is invalid for other types of error returns.

Return Values

If the function succeeds, the return value will be NO_ERROR.

If the function fails, the return value will be ERROR_INVALID_PARAMETER.

QuickInfo

  Windows NT: Use version 5.0 and later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in mprapi.h.
  Import Library: Link with mprapi.lib.

See Also

MprAdminServerConnect, MprAdminBufferFree, RAS_CONNECTION_0