|
◆ Connect()
int Connect |
( |
const __int64 |
Address, |
|
|
const GUID & |
Service, |
|
|
const unsigned char |
Channel = 0 , |
|
|
const bool |
Authentication = true , |
|
|
const bool |
Encryption = false , |
|
|
const unsigned long |
Timeout = 10000 |
|
) |
| |
Connects to a remote device.
- Parameters
-
Address | The remote Bluetooth device address. |
Service | The Bluetooth Service UUID. If the Channel parameter is zero, the system attempts to use Service to resolve the remote channel corresponding to the service. The service class is a normalized 128-bit GUID, defined by the Bluetooth specification. Common GUIDs are defined by the Bluetooth Assigned Numbers document. Alternatively, a unique GUID may be used for a domain-specific application. |
Channel | The RFCOMM channel number. If zero the Service UUID will be used. |
Authentication | Specifies that authentication is required for a connect operation to complete successfully. Setting this option actively initiates authentication during connection establishment, if the two Bluetooth devices were not previously authenticated. |
Encryption | The option enforces encryption to establish a connection. Encryption is only available for authenticated connections. |
Timeout | The connect timeout in milliseconds. The default value is 10000 milliseconds. |
- Returns
- If the function succeed the return value is WCL_E_SUCCESS. Otherwise the method returns one of the WCL error codes.
The method starts a connection operation to a remote device. If the method success that does not mean that the connection was established. That just means that the connection operation was started. The real connection result will be passed to the OnConnect event handler.
NOTE: BlueSoleil does not support Authentication and Encryption parameters per connection.
|