MprConfigTransportCreate

The MprConfigTransportCreate function adds the specified transport to the list of transports present in the specified router configuration.

DWORD MprConfigTransportCreate(
  HANDLE hMprConfig,                // handle to the router configuration
  DWORD dwTransportId,              // identifier of the transport/router
                                    // manager
  LPWSTR lpwsTransportName,         // address of the transport name
  LPBYTE pGlobalInfo,               // address of the global info
  DWORD dwGlobalInfoSize,           // size of the global info buffer
  LPBYTE pClientInterfaceInfo,      // address of info for client routers
  DWORD dwClientInterfaceInfoSize,  // size of the client info buffer
  LPWSTR lpwsDLLPath,               // address of the router manager
                                    // DLL name
  HANDLE phRouterTransport          // handle to the transport configuration
);

Parameters

hMprConfig
[in] Handle to the router configuration to which to add the transport. Obtain this handle by calling MprConfigServerConnect.
dwTransportId
[in] Specifies the transport to add to the configuration. This parameter also identifies the router manager for the transport.
lpwsTransportName
[in] Pointer to a Unicode string that specifies the name of the transport being added. If this parameter is not specified, the dwTransportId parameter is converted into a string and used as the transport name.
pGlobalInfo
[in] Pointer to an information header that specifies global information for the transport. The router manager for the transport interprets this information. Use the Information Header Functions to manipulate information headers.
dwGlobalInfoSize
[in] Specifies the size, in bytes, of the data pointed to by the pGlobalInfo parameter.
pClientInterfaceInfo
[in] Pointer to an information header that specifies default interface information for client routers. This information is used to configure dynamic interfaces for client routers for this transport. Use the Information Header Functions to manipulate information headers.

This parameter is optional; the calling application may specify NULL for this parameter.

dwClientInterfaceInfoSize
[in] Specifies the size, in bytes, of the data pointed to by the pClientInterfaceInfo parameter. If the calling application specifies NULL for pClientInterfaceInfo, the calling application should specify zero for this parameter.
lpwsDLLPath
[in] Pointer to a Unicode string that specifies the name of the router manager DLL for the specified transport. If this name is specified, the function sets the DLL path for this transport to this name.

This parameter is optional; the calling application may specify NULL for this parameter.

phRouterTransport
[out] Pointer to a handle variable. This variable receives a handle to the transport 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 phRouterTransport parameter is NULL, or both are NULL.
ERROR_NOT_ENOUGH_MEMORY Insufficient resources to complete the operation.
Other Use FormatMessage to retrieve the system error message that corresponds to the error code returned.

Remarks

If the specified transport already exists, MprConfigTransportCreate does the equivalent of an MprConfigTransportSetInfo call using the supplied parameter values.

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