次の方法で共有


BthGetRemoteCOD (Compact 2013)

3/26/2014

This function retrieves the class of device (COD) for a specified Bluetooth peer device.

Syntax

int BthGetRemoteCOD ( 
  BT_ADDR *pbt,
  unsigned int *pcod
);

Parameters

  • pbt
    [in] Pointer to the address of the peer device.
  • pcod
    [out] Pointer to the COD of the remote device. Potential values are defined in the Bluetooth Assigned Numbers documents on the Bluetooth website.

Return Value

The following table shows the possible return values.

Value

Description

ERROR_SUCCESS

Success.

ERROR_SERVICE_NOT_ACTIVE

The Bluetooth stack is not present.

Other standard HRESULT error codes may be returned as appropriate.

Remarks

The Bluetooth stack cannot always retrieve the COD if the local device initiates the connection and an inquiry has not occurred, or if the inquiry occurred a long time ago and the cached inquiry results no longer exist.

Requirements

Header

bt_api.h

Library

Btdrt.lib

See Also

Reference

Bluetooth API Management Functions