Compartir a través de


IConnector::ConnectTo

Previous Next

IConnector::ConnectTo

The ConnectTo method connects this connector to a connector in another device-topology object.

HRESULT ConnectTo(
  IConnector  *pConnectTo
);

Parameters

pConnectTo

[in] The other connector. This parameter points to the IConnector interface of the connector object that represents the connector in the other device topology. The caller is responsible for releasing its counted reference to the IConnector interface when it is no longer needed. The ConnectTo method obtains its own reference to this interface.

Return Value

If the method succeeds, it returns S_OK. If it fails, possible return codes include, but are not limited to, the values shown in the following table.

Return code Description
E_POINTER Pointer pConnectTo is NULL.
E_NOINTERFACE The object pointed to by pConnectTo is not a valid connector object.
HRESULT_FROM_WIN32(ERROR_DEVICE_ALREADY_ATTACHED) One of the two connectors is already attached to another connector.

For information about the HRESULT_FROM_WIN32 macro, see the Windows SDK documentation.

Requirements

Client: Windows Vista

Header: Include Devicetopology.h.

See Also

Previous Next