PFNSCO_INDICATION_CALLBACK callback function (bthddi.h)

Profile drivers implement a SCO callback function to provide the Bluetooth driver stack with a mechanism to notify the profile driver about incoming SCO connection requests from remote devices, and any changes to the status of a currently open SCO connection.

Syntax

PFNSCO_INDICATION_CALLBACK PfnscoIndicationCallback;

void PfnscoIndicationCallback(
  [in] PVOID Context,
  [in] SCO_INDICATION_CODE Indication,
  [in] PSCO_INDICATION_PARAMETERS Parameters
)
{...}

Parameters

[in] Context

For incoming remote connection request indications, this is the context specified by the profile driver in the IndicationCallbackContext member of the _BRB_SCO_REGISTER_SERVER structure when the profile driver registered the callback function. For changes to existing SCO connections, this is the CallbackContext member specified by the profile driver when it built and sent a BRB_SCO_OPEN_CHANNEL BRB.

[in] Indication

A SCO_INDICATION_CODE value that indicates the type of SCO event.

[in] Parameters

A SCO_INDICATION_PARAMETERS structure that contains parameter information based on the value passed to the Indication parameter.

Return value

None

Remarks

The BtAddress member found in the SCO_INDICATION_PARAMETERS structure passed in the Parameters parameter indicates the Bluetooth address of the remote device.

The PFNSCO_INDICATION_CALLBACK function can be registered in two ways.

In the first case, the profile driver acts as a server and must register this callback function through the IndicationCallback member of the _BRB_SCO_REGISTER_SERVER structure. The Bluetooth driver stack can then call this function to notify the profile driver when a remote device attempts to contact it.

In the second case, the profile driver acts as a client and attempts to connect to a remote device using the BRB_SCO_OPEN_CHANNEL BRB. The PFNSCO_INDICATION_CALLBACK callback function is registered through the Callback member of the _BRB_SCO_OPEN_CHANNEL structure passed with the specified BRB when one of them is submitted through IOCTL_INTERNAL_BTH_SUBMIT_BRB.

After it is registered, the callback function is only associated with the channel that the BRB opened, and the function notifies the profile driver of actions that occur over the open channel to the remote device. Profile drivers can register a single function to handle channel notifications as a client and _BRB_SCO_REGISTER_SERVER notifications as a server.

The SCO_INDICATION_PARAMETERS structure held in the Parameters parameter is interpreted according to the SCO_INDICATION_CODE value that is passed to the callback function through the Indication parameter. For most notifications, there is a SCO_INDICATION_PARAMETERS union member that corresponds to the event and contains event-specific parameters.

Requirements

Requirement Value
Minimum supported client Versions:_Supported in Windows Vista, and later.
Target Platform Desktop
Header bthddi.h (include Bthddi.h)
IRQL Developers should code this function to operate at either IRQL = DISPATCH_LEVEL (if the callback function does not access paged memory), or IRQL = PASSIVE_LEVEL (if the callback function must access paged memory)

See also

BRB_SCO_OPEN_CHANNEL

IOCTL_INTERNAL_BTH_SUBMIT_BRB

SCO_INDICATION_CODE

SCO_INDICATION_PARAMETERS

_BRB_SCO_REGISTER_SERVER