MprConfigInterfaceTransportEnum
[This is preliminary documentation and subject to change.]
The MprConfigInterfaceTransportEnum function enumerates the transports configured on the specified interface.
DWORD MprConfigInterfaceTransportEnum(
HANDLE hMprConfig, // handle to the router configuration
HANDLE hRouterInterface, // handle to the interface configuration
DWORD dwLevel, // level of information requested
LPBYTE * lplpBuffer, // array of MPR_IFTRANSPORT_0 structures
DWORD dwPrefMaxLen, // maximum length of data to return
LPDWORD lpdwEntriesRead, // number of entries enumerated
LPDWORD lpdwTotalEntries, // number of entries that could've
// been enumerated
LPDWORD lpdwResumeHandle // handle for continuing the enumeration
);
Parameters
-
hMprConfig
-
Handle to the router configuration. Obtain this handle by calling MprConfigServerConnect.
-
hRouterInterface
-
Handle to the interface configuration from which to enumerate the transports. Obtain this handle by calling MprConfigInterfaceCreate, or MprConfigInterfaceEnum.
-
dwLevel
-
Level of the information returned in the lplpBuffer parameter. This parameter must be zero.
-
lplpBuffer
-
Pointer to pointer variable. On successful return, this pointer variable will point to an array of MPR_IFTRANSPORT_0 structures This memory should be freed by calling MprConfigBufferFree.
-
dwPrefMaxLen
-
Specifies the preferred maximum length of returned data (in 8-bit bytes). If this parameter is -1, the buffer returned will be large enough to hold all available information.
-
lpdwEntriesRead
-
Pointer to a DWORD variable. On successful return, this variable contains the total number of entries that were enumerated from the current resume position.
-
lpdwTotalEntries
-
Pointer to a DWORD variable. On successful return, this variable contains the total number of entries that could have been enumerated from the current resume position.
-
lpdwResumeHandle
-
Pointer to a DWORD variable. On successful return, this variable contains a resume handle that can be used to continue the enumeration. The handle should be zero on the first call, and left unchanged on subsequent calls. If on return, the handle is NULL, the enumeration cannot be continued. For other types of error returns, this handle is invalid.
This parameter is optional. If the caller specifies NULL for this parameter, the function will not return a resume handle.
Return Values
-
NO_ERROR
-
The interface transports were enumerated successfully.
-
ERROR_INVALID_PARAMETER
-
One of the following is true:
hMprConfig is NULL.
HRouterInterface is NULL.
dwLevel is not zero.
lplpBuffer is NULL.
dwPrefMaxLen is smaller than the size of a single MPR_TRANSPORT_0 structure.
lpdwEntriesRead is NULL.
lpdwTotalEntries is NULL.
-
ERROR_NOT_ENOUGH_MEMORY
-
Insufficient resources to complete the operation.
-
ERROR_NO_MORE_ITEMS
-
No more entries available from the current resume position.
-
Other
-
Use FormatMessage to retrieve the system error message corresponding to the error code returned.
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
FormatMessage, MPR_IFTRANSPORT_0, MprConfigBufferFree, MprConfigInterfaceCreate, MprConfigInterfaceEnum, MprConfigInterfaceGetHandle