IConnector::ConnectTo method (devicetopology.h)
The ConnectTo method connects this connector to a connector in another device-topology object.
Syntax
HRESULT ConnectTo(
[in] IConnector *pConnectTo
);
Parameters
[in] pConnectTo
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 |
---|---|
|
Pointer pConnectTo is NULL. |
|
The current connector and remote connector pointed to by pConnectTo, have the same direction of data flow. A connector with data-flow direction "In" must be connected to another connector with data-flow direction "Out" to create a valid connection in the topology. To determine the data flow of a connector, call IConnector::GetDataFlow. |
|
The object pointed to by pConnectTo is not a valid connector object. |
|
One of the two connectors is already attached to another connector. For information about this macro, see the Windows SDK documentation. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | devicetopology.h |