Udostępnij za pośrednictwem


IDeviceAgentTransport::AcceptConnectionEx

Accepts a connection initiated when CreatePacketStream is called on the desktop computer. The method then prepares the device packet stream argument for data transfer.

HRESULT AcceptConnectionEx([full][in] LPCOLESTR in_szServiceId, [out] IDevicePacketStream **out_pDevicePacketStream)

Parameters

  • in_szServiceId
    Service ID on which to accept a connection.

  • out_pDevicePacketStream
    Pointer to the device packet stream object that performs the data transfer.

Return Value

An HRESULT value that indicates the outcome of the method call.

Remarks

Connections can only be accepted on service IDs that have already been registered with IDeviceAgentTransport::AcknowledgeLaunch.

Example

This example accepts a request to create a packet stream from CreatePacketStream on the desktop application. For the complete example, see IDeviceAgentTransport.

Managed Equivalent

IDeviceAgentTransport..::.AcceptConnectionEx

Requirements

DeviceAgentTransport.h

See Also

Reference

IDeviceAgentTransport