Share via


IOCTL_AG_OPEN_AUDIO (Compact 2013)

3/26/2014

This I/O control message opens a service level connection and an audio connection to the hands-free device. Send this message with DeviceIoControl.

Syntax

BOOL DeviceIoControl(
    HANDLE hDevice,           // handle to device
    DWORD dwIoControlCode,    // use IOCTL_AG_OPEN_AUDIO
    LPVOID lpInBuffer,        // pointer to input buffer
    DWORD nInBufferSize,      // input buffer size
    LPVOID lpOutBuffer,       // pointer to output buffer
    DWORD nOutBufferSize,     // output buffer size
    LPDWORD lpBytesReturned,  // number of bytes returned
    OVERLAPPED lpOverlapped   // pointer to OVERLAPPED structure
);

Parameters

  • hDevice
    The handle to the device.
  • dwIoControlCode
    [in] Control code for the operation. Use IOCTL_AG_OPEN_AUDIO for this operation.
  • lpInBuffer
    [in] Not used; set to NULL.
  • nInBufferSize
    [in] Not used; set to zero.
  • lpOutBuffer
    [out] Not used; set to NULL.
  • nOutBufferSize
    [out] Not used; set to zero.
  • lpBytesReturned
    [out] Not used; set to NULL.
  • lpOverlapped
    [out] Not used; set to NULL.

Remarks

To close an audio connection to the hands-free device, use the IOCTL_AG_CLOSE_AUDIO I/O control.

To route audio to the hands-free device independent of the Network Component, you must first open or close an audio connection.

OEM Extensibility Considerations

To route audio to the Bluetooth hardware outside the call context, the application can send IOCTL_AG_OPEN_AUDIO to the AG service. The AG service automatically sends the WODM_BT_SCO_AUDIO_CONTROL message to the audio driver when an incoming call is answered by the hands-free device and outgoing calls are placed with the phone connected to the hands-free device.

Requirements

Header

btagpub.h

See Also

Reference

Bluetooth AG Service IOCTL Messages