PORTEMUPortParams (Windows CE 5.0)
This structure is used when creating a virtual COM port.
typedef struct _portemu_port_params {int channel;int flocal;BT_ADDR device;int imtu;int iminmtu;int imaxmtu;int isendquota;int irecvquota;GUID uuidService;unsigned int uiportflags;} PORTEMUPortParams;
Members
channel
Set to either an explicit server channel, or, for a server application that wants the server channel to be autobound, to RFCOMM_CHANNEL_MULTIPLE. Call the IOCTL, IOCTL_BLUETOOTH_GET_RFCOMM_CHANNEL to determine which channel was assigned.flocal
Set to TRUE for a server port that accepts connections, or to FALSE for a client port that is used to creating outgoing connections.device
The BT_ADDR of a target device on a client port. BT_ADDR is defined in Ws2bth.h:typedef ULONGLONG bt_addr, *pbt_addr, BT_ADDR, *PBT_ADDR;
imtu
The suggested number for the maximum transmission unit (MTU) for a packet in negotiations on connect, iminmtu and imaxmtu define acceptable range of negotiation (if all 3 are 0, default will be used).iminmtu
Defines an acceptable range of negotiation.imaxmtu
Defines an acceptable range of negotiation.isendquota
Queue size on send. The WriteFile operation will block if isendquota is exceeded. If set to 0, the default setting is used.irecvquota
Queue size on receive. Flow control is used to prevent receiving more data than irecvquota. Incoming data is discarded if it exceeds this limit. If set to 0, the default setting is used.uuidService
Specifies the UUID for the target RFCOMM service. If channel == 0 for the client port, an SDP query is performed to determine the target channel id before the connection is made.uiportflags
Can be a combination of the following flags.Flag Hex code RFCOMM_PORT_FLAGS_REMOTE_DCB 0x00000001 RFCOMM_PORT_FLAGS_KEEP_DCD 0x00000002 RFCOMM_PORT_FLAGS_AUTHENTICATE 0x00000004 RFCOMM_PORT_FLAGS_ENCRYPT 0x00000008
Remarks
If RFCOMM_PORT_FLAGS_AUTHENTICATE and/or RFCOMM_PORT_FLAGS_ENCRYPT is set, authentication is performed and/or encryption is toggled at connection establishment.
If RFCOMM_PORT_FLAGS_REMOTE_DCB is set, the Get or SetCommState functions initiate RFCOMM "remote port negotiation" (RPN) command, otherwise a local copy of DCB is being operated on.
If RFCOMM_PORT_FLAGS_KEEP_DCD, the data carrier detect flag is raised on connection and kept up throughout. In NULL-modem cable, DCD is paired with DSR signal and is always on.
The direct connection UNIMODEM function uses DCD to detect cable unplugging. If a peer does not keep this bit on throughout the connection, this flag may be used to have port emulation layer simulate the bit being on.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Bt_api.h.
See Also
Send Feedback on this topic to the authors