次の方法で共有


BTH_SOCKOPT_SECURITY (Compact 2013)

3/26/2014

This structure defines the link key or PIN associated with a peer Bluetooth device that is connected through a Winsock interface.

Syntax

typedef struct _BTH_SOCKOPT_SECURITY {
  int iLength; 
  bt_addr btAddr; 
  unsigned char caData[16];
} BTH_SOCKOPT_SECURITY, *PBTH_SOCKOPT_SECURITY;

Members

  • iLength
    Length of caData. Set to 16 for a link key, or the number of characters in a PIN. Set to 0 to revoke a link key or PIN.
  • btAddr
    Bluetooth address of the peer device on which the link-key query is being performed, or 0 if the link key is revoked. If set to 0, and the socket is connected, the Bluetooth address of the peer device is used instead. If the socket is not connected and it is the listening socket, the PIN becomes an access code for all incoming connections. Otherwise, the PIN is set when the socket is connected.
  • caData
    Link key or PIN to set for the peer Bluetooth device.

Remarks

This structure is associated with the SO_BTH_SET_PIN and SO_BTH_SET_LINK socket options. See setsockopt (Bluetooth).

Requirements

Header

ws2bth.h

See Also

Reference

Bluetooth Application Development Structures