MprConfigInterfaceGetInfo

[This is preliminary documentation and subject to change.]

The MprConfigInterfaceGetInfo function retrieves the configuration for the specified interface from the router.

DWORD MprConfigInterfaceGetInfo(
  HANDLE hMprConfig,        // handle to the router configuration
  HANDLE hRouterInterface,  // handle to the interface configuration
  DWORD dwLevel,            // level of information requested
  LPBYTE *lplpBuffer,       // MPR_INTERFACE_0 structure
  LPDWORD lpdwBufferSize    // size of returned data
);

Parameters

hMprConfig
[in] Handle to the router configuration. Obtain this handle by calling MprConfigServerConnect.
hRouterInterface
[in] Handle to the interface configuration for which to retrieve information. Obtain this handle by calling MprConfigInterfaceCreate, MprConfigInterfaceGetHandle, or MprConfigInterfaceEnum.
dwLevel
[in] Specifies the level of the information returned in the lplpBuffer parameter. This parameter must be zero.

Windows 2000 and later: This parameter may have a value of one. A value of one indicates that the lplpBuffer parameter points to a MPR_INTERFACE_1 structure.

lplpBuffer
[in, out] On input, pointer to a pointer variable.

On output, points to an MPR_INTERFACE_0 structure. Free this buffer by calling MprConfigBufferFree.

Windows 2000 and later: The pointer variable may point to either an MPR_INTERFACE_0 or MPR_INTERFACE_1 structures. The type of structure is indicated by the value of the dwLevel parameter.

lpdwBufferSize
[out] Pointer to a DWORD variable. This variable receives the size, in bytes, of the data returned through lplpBuffer.

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_INVALID_PARAMETER At least one of the following is true:
  • hMprConfig is NULL
  • hRouterInterface is NULL
  • dwLevel is not zero or one.
  • lplpBuffer is NULL
  • lpdwBufferSize is NULL
ERROR_NOT_ENOUGH_MEMORY Insufficient resources to complete the operation.
ERROR_NO_SUCH_INTERFACE The interface that corresponds to hRouterInterface is not present in the router configuration.

Requirements

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

See Also

Router Management Reference, Router Configuration Functions, MprConfigBufferFree, MprConfigInterfaceCreate, MprConfigInterfaceEnum, MprConfigInterfaceGetHandle, MprConfigServerConnect