Select Method
Used to set the currently selected service and characteristic by their Ids.
Syntax
ANSI (Cross Platform) int Select(const char* lpszServiceId, const char* lpszCharacteristicId); Unicode (Windows) INT Select(LPCWSTR lpszServiceId, LPCWSTR lpszCharacteristicId);
#define MID_BLECLIENT_SELECT 12 IPWORKSBLE_EXTERNAL int IPWORKSBLE_CALL IPWorksBLE_BLEClient_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);
Remarks
This is a convenience method used to select a specific service and/or characteristic.
To select just a service, only pass the desired service Id for ServiceId; pass empty string for CharacteristicId. To select a characteristic, pass both of the Ids.
As long as both of the Ids are valid, the Service and Characteristic properties will be set accordingly (Characteristic is cleared if a characteristic Id isn't given).
An error will be thrown if any of the Ids aren't valid, or if an invalid combination of Ids is passed.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)