MprAdminInterfaceEnum

[This is preliminary documentation and subject to change.]

The MprAdminInterfaceEnum function enumerates all the interfaces on a specified server.

DWORD MprAdminInterfaceEnum(
  MPR_SERVER_HANDLE hMprServer,  // handle to the router
  DWORD dwLevel,                 // level of information provided
  LPBYTE *lplpbBuffer,           // array of information structures
  DWORD dwPrefMaxLen,            // maximum length of data to return
  HANDLE lpdwEntriesRead,        // number of interfaces enumerated
  HANDLE lpdwTotalEntries,       // number of interfaces that could 
                                 // have been enumerated
  LPDWORD lpdwResumeHandle       // handle for continuing 
                                 // the enumeration
);

Parameters

hMprServer
[in] Handle to the Windows 2000 router on which to execute this call. Obtain this handle by calling MprAdminServerConnect.
dwLevel
[in]Specifies the level of information passed in lpBuffer. Must be zero.
lplpbBuffer
[out] Pointer to a pointer variable that points to an array of MPR_INTERFACE_0 structures on successful return. This memory should be freed by the MprAdminBufferFree call.
dwPrefMaxLen
[in] Specifies the preferred maximum length of returned data (in 8-bit bytes). If this parameter is -1, the buffer returned is large enough to hold all available information.
lpdwEntriesRead
[out] Pointer to a DWORD variable. This variable receives the total number of interfaces that were enumerated from the current position in the enumeration.
lpdwTotalEntries
[out] Pointer to a DWORD variable. This variable receives the total number of interfaces that could have been enumerated from the current resume position.
lpdwResumeHandle
[in] Pointer to a DWORD variable. This variable specifies 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 the return code is ERROR_MORE_DATA then the call may be re-issued using the handle to retrieve more data. 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 calling application specifies NULL for this parameter, the function will not return a resume handle.

Return Values

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
ERROR_ACCESS_DENIED The calling application does not have sufficient privileges.
ERROR_MORE_DATA More information is available; the enumeration can be continued.
ERROR_NOT_ENOUGH_MEMORY Insufficient resources to complete the operation.
ERROR_NOT_SUPPORTED The value of dwLevel is invalid.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Mprapi.h.
  Library: Use Mprapi.lib.

See Also

Router Management Reference, Router Administration Functions, MPR_INTERFACE_1, MprAdminBufferFree, MprAdminServerConnect