MprConfigInterfaceEnum
[This is preliminary documentation and subject to change.]
The MprConfigInterfaceEnum function enumerates the interfaces configured for the router.
DWORD MprConfigInterfaceEnum(
HANDLE hMprConfig, // handle to the router configuration
DWORD dwLevel, // level of information requested
LPBYTE * lplpBuffer, // array of MPR_INTERFACE_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.
-
dwLevel
-
Level of the information returned through the lplpBuffer parameter. This parameter must be zero.
-
lplpBuffer
-
Pointer to a pointer variable. On successful return, this pointer variable will point to an array of MPR_INTERFACE_0 structures. Free this memory 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 interfaces were enumerated successfully.
-
ERROR_INVALID_PARAMETER
-
One of the following is true:
hMprConfig is NULL.
dwLevel is not zero.
lplpBuffer is NULL.
dwPrefMaxLen is smaller than the size of a single MPR_INTERFACE_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, MprConfigBufferFree, MprConfigServerConnect