MprConfigInterfaceTransportAdd

[This is preliminary documentation and subject to change.]

The MprConfigInterfaceTransportAdd function adds the specified transport to the specified interface configuration on the router.

DWORD  MprConfigInterfaceTransportAdd(
  HANDLE hMprConfig,              // handle to the router configuration
  HANDLE hRouterInterface,        // handle to the interface configuration
  DWORD dwTransportId,            // identifier of the transport/router
                                  // manager
  LPWSTR lpwsTransportName,       // transport name
  LPBYTE pInterfaceInfo,          // interface information
  DWORD dwInterfaceInfoSize,      // size of interface information
  HANDLE * phRouterIfTransport    // handle to transport configuration
);

Parameters

hMprConfig
Handle to the router configuration. Obtain this handle by calling MprConfigServerConnect.
hRouterInterface
Handle to the interface configuration to add the specified transport. Obtain this handle by calling MprConfigInterfaceCreate, MprConfigInterfaceGetHandle, or MprConfigInterfaceEnum.
dwTransportId
Identifies the transport. This parameter also identifies the router manager for the transport.
lpwsTransportName
Pointer to a Unicode string containing the name for the transport being added. If this parameter is not specified, and the transport is IP or IPX, MprConfigInterfaceTransportAdd will use "IP" or "IPX". If this parameter is not specified, and the transport is other than IP or IPX, MprConfigInterfaceTransportAdd will convert the dwTransportId parameter into a string, and use that as the transport name.
pInterfaceInfo
Pointer to the interface information to be added to the interface configuration. The router manager for the specified transport interprets this information.
dwInterfaceInfoSize
Specifies the size, in bytes, of the data pointed to by pInterfaceInfo.
phRouterIfTransport
Pointer to a handle variable. On successful return, this variable will contain a handle to the transport configuration for this interface.

Return Values

NO_ERROR
The transport configuration was added successfully.
ERROR_INVALID_PARAMETER
One of the following is true:

hMprConfig is NULL.

hRouterInterface is NULL.

phRouterIfTransport is NULL.

ERROR_NOT_ENOUGH_MEMORY
Insufficient resources to complete the operation.
Other
Use FormatMessage to retrieve the system error message corresponding to the error code returned.

Remarks

In addition to specifying a transport, the dwTransportId parameter also specifies a router manager, since Windows NT router maintains a unique router manager for each transport.

If the specified transport already exists, MprConfigInterfaceTransportAdd does the equivalent of an MprConfigInterfaceTransportSetInfo call using the given parameter values.

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, MPR_IFTRANSPORT_0, MprConfigInterfaceCreate, MprConfigInterfaceEnum, MprConfigInterfaceGetHandle, MprConfigServerConnect