Partager via


IOCTL_BLUETOOTH_GET_RFCOMM_CHANNEL (Compact 2013)

3/26/2014

This I/O control message determines the RFCOMM (Serial Cable Emulation Protocol) channel assigned when the server channel is auto-bound. Send this message with DeviceIoControl.

Syntax

BOOL DeviceIoControl(
    HANDLE hDevice,           // handle to the device
    DWORD dwIoControlCode,    // use IOCTL_BLUETOOTH_GET_RFCOMM_DEVICE
    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
    [in] Handle to the device.
  • dwIoControlCode
    [in] Control code for the operation. Use IOCTL_BLUETOOTH_GET_RFCOMM_DEVICE for this operation.
  • lpInBuffer
    [in] Set to NULL.
  • nInBufferSize
    [in] Set to zero
  • lpOutBuffer
    [out] Pointer to a DWORD that receives the channel number.
  • nOutBufferSize
    [out] Set to sizeof(DWORD).
  • lpBytesReturned
    [in][out] set to NULL.
  • lpOverlapped
    [in] Ignored, set to NULL.

Remarks

The server channel is auto-bound when the virtual COM port is registered with PORTEMUPortParams.channel = RFCOMM_CHANNEL_MULTIPLE.

Requirements

Header

bt_api.h

See Also

Reference

Bluetooth Application Development IOCTLs
PORTEMUPortParams