Windows XP supports a much smaller number of socket options for Bluetooth than Windows CE, although it generally provides alternative ways to get/set those properties. The table below shows those that are supported on XP and how they relate to their Windows CE equivalent. Notice that the only one which behaves the same on both platforms is SO_BTH_ENCRYPT
|
Windows XP |
Windows CE |
|
#define SO_BTH_AUTHENTICATE 0x80000001 // optlen=sizeof(ULONG), optval = &(ULONG)TRUE/FALSE |
#define SO_BTH_AUTHENTICATE 0x00000001 // optlen=0, optval ignored |
|
#define SO_BTH_ENCRYPT 0x00000002 // optlen=sizeof(ULONG), optval = &(ULONG)TRUE/FALSE |
#define SO_BTH_ENCRYPT 0x00000002 // optlen=sizeof(unsigned int), optval = &(unsigned int)TRUE/FALSE |
|
#define SO_BTH_MTU 0x80000007 // optlen=sizeof(ULONG), optval = &mtu
|
#define SO_BTH_SET_MTU 0x00000006 // unconnected only! optlen=sizeof(unsigned int), optval = &mtu |
|
#define SO_BTH_GET_MTU 0x00000007 // optlen=sizeof(unsigned int), optval = &mtu |
|
#define SO_BTH_MTU_MAX 0x80000008 // optlen=sizeof(ULONG), optval = &max. mtu
|
#define SO_BTH_SET_MTU_MAX 0x00000008 // unconnected only! optlen=sizeof(unsigned int), optval = &max. mtu |
|
#define SO_BTH_GET_MTU_MAX 0x00000009 // bound only! optlen=sizeof(unsigned int), optval = &max. mtu |
|
#define SO_BTH_MTU_MIN 0x8000000a // optlen=sizeof(ULONG), optval = &min. mtu |
#define SO_BTH_SET_MTU_MIN 0x0000000a // unconnected only! optlen=sizeof(unsigned int), optval = &min. mtu |
|
#define SO_BTH_GET_MTU_MIN 0x0000000b // bound only! optlen=sizeof(unsigned int), optval = &min. mtu |
The current version of the Bluetooth.NET library doesn't include the XP versions in the BluetoothSocketOptionName enumeration, but I have added these for the next release.