MprAdminConnectionEnumEx function (mprapi.h)
The MprAdminConnectionEnumEx function enumerates the active connections for a specified RRAS server.
Syntax
DWORD MprAdminConnectionEnumEx(
[in] RAS_SERVER_HANDLE hRasServer,
[in] PMPRAPI_OBJECT_HEADER pObjectHeader,
[in] DWORD dwPreferedMaxLen,
[out] LPDWORD lpdwEntriesRead,
[out] LPDWORD lpdwTotalEntries,
[out] PRAS_CONNECTION_EX *ppRasConn,
[in] LPDWORD lpdwResumeHandle
);
Parameters
[in] hRasServer
A handle to the RAS server on which connections are enumerated. Obtain this handle by calling MprAdminServerConnect.
[in] pObjectHeader
A pointer to an MPRAPI_OBJECT_HEADER structure that specifies the structure version received by ppRasConn.
[in] dwPreferedMaxLen
A value that specifies the preferred maximum length of returned data in 8-bit bytes. If dwPrefMaxLen is -1, the buffer returned is large enough to hold all available information.
[out] lpdwEntriesRead
A pointer to a DWORD that receives the total number of connections enumerated from the current resume position.
[out] lpdwTotalEntries
A pointer to a DWORD that receives the total number of connections that could have been enumerated from the current resume position.
[out] ppRasConn
A pointer, on output, to an array of RAS_CONNECTION_EX structures that contain the active connection information for the RRAS server in hRasServer. The number of array elements is determined by the value pointed to by lpdwEntriesRead.
[in] lpdwResumeHandle
A pointer to a DWORD variable that specifies a resume handle used to continue the enumeration. The lpdwResumeHandle parameter is NULL on the first call, and left unchanged on subsequent calls. 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.
Return value
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value is one of the following error codes.
Value | Meaning |
---|---|
|
The calling application does not have sufficient privileges. |
|
The Demand Dial Manager (DDM) is not running. |
|
Not all of the data was returned with this call. To obtain additional data, call the function again using the resume handle. |
|
The specified procedure could not be found. |
|
An error from MprError.h, RasError.h, or WinError.h. |
Remarks
The caller should free the memory pointed to by ppRasConn by calling the function MprAdminBufferFree.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
Target Platform | Windows |
Header | mprapi.h |
Library | Mprapi.lib |
DLL | Mprapi.dll |