Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method enables devices to clean up connections. It is called when a control point is no longer using a connection that the control point created using the PrepareForConnection action.

Syntax

virtual DWORD ConnectionComplete(
  long 
ConnectionID
) = 0;

Parameters

ConnectionID

[in] Connection ID of the connection that is no longer needed and can be cleaned up. Corresponds to the A_ARG_TYPE_ConnectionID state variable.

Return Value

Custom implementations can return appropriate error codes. If this method succeeds, it should return SUCCESS_AV. Otherwise, it 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_CM_INVALID_CONNECTION_REFERENCE

The implementation of this method in IConnectionManagerImplreturns the errors in the following table. In addition, it returns any error returned by the custom IConnectionManagerImpl::EndConnectionimplementation.

Value Description

SUCCESS_AV

Connection completion was successful.

Remarks

This method corresponds to the ConnectionManager service's ConnectionComplete action.

The implementation of this method in IConnectionManagerImplperforms these tasks:

  1. Calls IConnectionManagerImpl::EndConnectionto provide developers with a chance to perform any specific connection-completion tasks.

  2. Updates its internal connection data.

  3. Raises an event by calling IEventSink::OnStateChangedwith the CurrentConnectionIDs constant documented in ConnectionManagerState.

For more information about the actions in the ConnectionManager service, see UPnP AV DCP Documentation.

Requirements

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

See Also