Partager via


GetDeviceByName (Compact 2013)

3/26/2014

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

Syntax

HRESULT GetDeviceByName(
  const TCHAR *pszName, 
  IBTDevice **pDevice
);

Parameters

  • pszName
    [in] Name of the Bluetooth device.
  • pDevice
    [out] Pointer to the IBTDevice interface.

Returns Values

The following table shows the possible return values.

Value

Description

S_OK

Success.

E_FAIL

The device name 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