MprConfigInterfaceGetHandle

The MprConfigInterfaceGetHandle function retrieves a handle to the specified interface's configuration in the specified router configuration.

DWORD MprConfigInterfaceGetHandle(
  HANDLE hMprConfig,         // handle to the router configuration
  LPWSTR lpwsInterfaceName,  // Unicode string containing name
                             // of interface
  HANDLE *phRouterInterface  // handle to the specified interface
);

Parameters

hMprConfig
[in] Handle to the router configuration. Obtain this handle by calling MprConfigServerConnect.
lpwsInterfaceName
[in] Pointer to a Unicode string that specifies the name of the interface for which the configuration handle is requested.
phRouterInterface
[out] Pointer to a handle variable. This variable receives a handle to the interface configuration.

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 The hMprConfig parameter is NULL, or the lpwsInterfaceName parameter is NULL, or both parameters are NULL.
ERROR_NOT_ENOUGH_MEMORY Insufficient resources to complete the operation.
ERROR_NO_SUCH_INTERFACE The specified interface was not found in the router configuration.
Other Use FormatMessage to retrieve the system error message that corresponds to the error code returned.

Requirements

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

See Also

Router Management Reference, Router Configuration Functions, FormatMessage, MprConfigServerConnect