Partager via


IConnectionManager::GetCurrentConnectionInfo (Windows Embedded CE 6.0)

1/6/2010

This method returns information about the specified connection.

Note

This method returns IAVTransport and IRenderingControl references, in the ConnectionInfo structure. When control point code is finished with these objects, it must call IVirtualService::Release on each reference.

Syntax

virtual DWORD GetCurrentConnectionInfo(
  long ConnectionID,
  ConnectionInfo* pConnectionInfo
) = 0;

Parameters

Return Value

Custom implementations can return appropriate error codes. Should return SUCCESS_AV if the method succeeds. Otherwise, should return an error code defined in WinError.h or UPnP.h, or one of the UPnP AV-specific return values specified in UPnPAVError, especially the following error documented for this action in the ConnectionManager DCP documentation:

  • ERROR_AV_UPNP_ACTION_FAILED

The implementation of this method in IConnectionManagerImpl returns these errors:

Value Description

ERROR_AV_POINTER

The pConnectionInfo pointer is NULL.

ERROR_AV_UPNP_CM_INVALID_CONNECTION_REFERENCE

The specified connection ID does not refer to a valid connection.

SUCCESS_AV

The connection information was returned.

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.

Requirements

Header av_upnp.h
Library Av_upnp.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

IConnectionManager
IConnectionManager::GetFirstConnectionID
IConnectionManager::GetNextConnectionID
IVirtualService::Release
ConnectionInfo