User manual - Bluetoothライブラリマニュアルver.1.08(2014年8月6日)

37
5.13 BTGetDeviceHandle
Bluetooth 機器のデバイスハンドルを取得します。
[C++]
LONG BTGetDeviceHandle(
HANDLE *
DeviceHandle
,
LPTSTR
BTAddress
)
[Visual Basic]
Public Shared Function BTGetDeviceHandle( _
ByRef
DeviceHandle
As Int32, _
ByVal
BTAddress
As String _
) As Int32
[C#]
public static Int32 BTGetDeviceHandle(
ref Int32
DeviceHandle
,
string
BTAddress
);
解説
Bluetooth アドレスを指定して、Bluetooth 機器のデバイスハンドルを取得します。
パラメータ
DeviceHandle
Bluetooth 機器のデバイスハンドルを取得します。
BTAddress
Bluetooth アドレスを指定します。
戻り値
BTERR_SUCCESS
正常終了
BTERR_FAILED
Bluetooth 機器のデバイスハンドル取得失敗
BTERR_DRIVER
ドライバーエラー
FUNCTION_UNSUPPORT
未サポートエラー
補足
Bluetooth 機器のデバイスハンドルを取得後、必ず BTGetDeviceInfo 関数を実
行して、Bluetooth
器のデバイス情報を取得してください。指定した Bluetooth アドレスを持つ Bluetooth 機器のデバイス
ハンドルが、BTGetDeviceHandle 関数ま
たは BTInquiry 関数よってすでに取得されている場合、本関
数を実行するとエラーとなります。すでに取得したデバイスハンドルを使用してください。