MprAdminInterfaceGetInfo

The MprAdminInterfaceGetInfo function retrieves information for a specified interface on a specified server.

DWORD MprAdminInterfaceGetInfo(
  MPR_SERVER_HANDLE hMprServer,  // handle to router 
  HANDLE hInterface,             // handle to interface
  DWORD dwLevel,                 // level of information
  LPBYTE *lplpbBuffer            // buffer for information
);

Parameters

hMprServer
[in] Handle to the Windows 2000 router to query. This handle is obtained from a previous call to MprAdminServerConnect.
hInterface
[in] Handle to the interface obtained by a previous call to MprAdminInterfaceCreate.
dwLevel
[in] Specifies the type of structure returned through the lplpbBuffer parameter. Must be zero, indicating that the lpBuffer parameter points to an MPR_INTERFACE_0 structure.

Windows 2000 and later: Must have a value of zero, one or two. A value of one indicates that the lpBuffer parameter points to an MPR_INTERFACE_1 structure. A value of two indicates that the lpBuffer parameter points to an MPR_INTERFACE_2 structure.

lplpbBuffer
[in] Pointer to a pointer variable. This variable will point to an MPR_INTERFACE_0 structure. Free this memory by calling MprAdminBufferFree.

Windows 2000 and later: The pointer variable may point to an MPR_INTERFACE_0, MPR_INTERFACE_1, or MPR_INTERFACE_2 structure. The type of the structure should be indicated by the value of the dwLevel parameter.

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_INVALID_HANDLE The hInterface value is invalid.
ERROR_INVALID_PARAMETER The lplpbBuffer parameter is NULL.
ERROR_NOT_ENOUGH_MEMORY Insufficient resources to complete the operation.
ERROR_NOT_SUPPORTED The dwLevel value 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_0, MPR_INTERFACE_1, MPR_INTERFACE_2, MprAdminBufferFree, MprAdminInterfaceCreate, MprAdminServerConnect