IWCNDevice::Connect method (wcndevice.h)
The IWCNDevice::Connect method initiates the session.
Syntax
HRESULT Connect(
[in] IWCNConnectNotify *pNotify
);
Parameters
[in] pNotify
A pointer to the implemented IWCNConnectNotify callback interface which specifies if a connection has been successfully established.
Return value
This method can return one of these values.
Return code | Description |
---|---|
|
The operation has succeeded. |
|
The device does not support the connection options queued via IWCNDevice::Set. |
|
The device could not be located on the network. |
Remarks
After calling this method you may not call any other IWCNDevice 'Set' methods. There is no way to cancel or roll back device settings once a connection has been established.
NULL can be passed via pNotify, in place of the IWCNConnectNotify callback interface to prevent notification from being sent when the connect operation is complete.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | None supported |
Target Platform | Windows |
Header | wcndevice.h |