Compartir a través de


IConnectionManagerImpl::CreateConnection (Windows CE 5.0)

Send Feedback

This method provides developers with a chance to perform custom connection-preparation tasks, including creating and returning references to IAVTransport and IRenderingControl instances. IConnectionManager::PrepareForConnection calls this method when it starts preparing the connection.

virtual DWORD CreateConnection(  LPCWSTR              pszRemoteProtocolInfo,  DIRECTION            Direction,  long                 ConnectionID,  IAVTransport**       ppAVTransport,  IRenderingControl**  ppRenderingControl) = 0;

Parameters

  • pszRemoteProtocolInfo
    [in] Specifies the protocol, network, and media format to be used when the content is transferred. The value of this parameter is the same as one of the entries in the list returned by the remote device's GetProtocolInfo action (GetProtocolInfo is exposed in the UPnP AV Framework by IConnectionManager::GetProtocolInfo). If the remote device does not provide the GetProtocolInfo action, this value is one of the entries in the protocol information list on this device.
  • Direction
    [in] If OUTPUT, the local device uses this connection to send content. If INPUT, the local device uses this connection to receive content.
  • ConnectionID
    [in] ID of the connection that is in the process of being created.
  • ppAVTransport
    [in, out] Pointer to a pointer to an IAVTransport implementation that implements the virtual AVTransport service on the local device for this connection. The implementation of this method should create and return a pointer to an IAVTransport implementation.
  • ppRenderingControl
    [in, out] Pointer to a pointer to an IRenderingControl implementation that implements the virtual RenderingControl service on the local device for this connection. The implementation of this method should create and return a pointer to an IRenderingControl implementation.

Return Values

If the implementation of this method returns SUCCESS_AV (defined in UPnPAVError), PrepareForConnection continues normal operation.

If the implementation of this method returns any other return code, PrepareForConnection returns immediately and returns the same error code returned by this method.

Remarks

The AVTransport service's PrepareForConnection action is defined as optional in the UPnP AV DCP. The AV renderer sample implements PrepareForConnection, or does not, depending on the value of the CM_NO_PREPARE_FOR_CONNECTION preprocessor definition. If this constant is defined, the sample does not support PrepareForConnection; otherwise, the sample provides support for multiple connections. To see how this definition is used, examine ConnectionManager.cpp in the AV renderer sample's source directory.

For more information about the ContentDirectory service, see the ContentDirectory DCP documentation in UPnP AV DCP Documentation.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: Av_upnp.h.
Link Library: Av_upnp.lib.
C++ Namespace: av_upnp.

See Also

IConnectionManagerImpl | IAVTransport | IConnectionManager::GetProtocolInfo | IConnectionManager::PrepareForConnection | IRenderingControl | UPnPAVError

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.