In The Hand
GetServiceRecords Method (service)
NamespacesInTheHand.Net.SocketsBluetoothDeviceInfoGetServiceRecords(Guid)
.NET Components for Mobility
Run an SDP query on the device’s Service Discovery Database.
Declaration Syntax
C#Visual Basic
public ServiceRecord[] GetServiceRecords(
	Guid service
)
Public Function GetServiceRecords ( _
	service As Guid _
) As ServiceRecord()
Parameters
service (Guid)
The UUID to search for, as a Guid.
Return Value
The parsed record as an ServiceRecord.
Remarks

For instance to see whether the device has an an Serial Port service search for UUID SerialPort, or too find all the services that use RFCOMM use RFCommProtocol, or all the services use L2CapProtocol.

If the device isn’t accessible a SocketException with ErrorCode 10108 (0x277C) occurs.

Examples
Copy 
Dim bdi As BluetoothDeviceInfo = ...
Dim records As ServiceRecord() = bdi.GetServiceRecords(BluetoothService.RFCommProtocol)
' Dump each to console
For Each curRecord As ServiceRecord In records
   ServiceRecordUtilities.Dump(Console.Out, curRecord)
Next
Exceptions
ExceptionCondition
SocketException The query failed.

Assembly: InTheHand.Net.Personal (Module: InTheHand.Net.Personal) Version: 3.0.0.0