Partager via


GetDeviceByAddr (Compact 2013)

3/26/2014

This function searches the registry for the specified device address and returns a pointer to the IBTDevice interface.

Syntax

HRESULT GetDeviceByAddr(
  const BT_ADDR *b, 
  IBTDevice **pDevice
);

Parameters

  • b
    [in] Pointer to the address of the device.
  • pDevice
    [out] Pointer to the IBTDevice interface.

Return Value

The following table shows the possible return values.

Value

Description

S_OK

Success.

E_FAIL

The address was not found in the registry or the BTDEVICE object could not be created and initialized.

Remarks

This function creates a new BTDEVICE object and initializes it from the registry entries for the specified Bluetooth device, then returns a pointer to the IBTDevice interface. The caller application is responsible for releasing pDevice.

Requirements

Header

bthutil_p.h

Library

Bthutil.lib

See Also

Reference

Bluetooth API Miscellaneous Functions