Case 1 USE_OLD_MODE = 0 & FILL_DCB = 0 -------------------------------- OLD STYLE: disable PRE BUILD DCB: disable ============================== WILL TRY... ============================== DCBlength 80 BaudRate 2400 fbits 0x0012feac ByteSize 8 XonLim 0 XoffLim 3 Parity 0 XonChar 0x00 XoffChar 0x00 StopBits 0 ErrorChar 0x00 EofChar 0x00 EvtChar 0x00 Error in parameter. --------------------------------- output from portmon.... IRP_MJ_CREATE SUCCESS Options: Open IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_SET_BAUD_RATE SUCCESS Rate: 2400 IOCTL_SERIAL_SET_LINE_CONTROL INVALID PARAMETER StopBits: 1 Parity: NONE WordLength: 0 IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_SET_BAUD_RATE SUCCESS Rate: 2400 IOCTL_SERIAL_SET_DTR SUCCESS IOCTL_SERIAL_SET_LINE_CONTROL SUCCESS StopBits: 1 Parity: NONE WordLength: 7 IOCTL_SERIAL_SET_CHAR SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 IOCTL_SERIAL_SET_HANDFLOW SUCCESS Shake:80000009 Replace:80000080 XonLimit:2048 XoffLimit:512 IRP_MJ_FLUSH_BUFFERS SUCCESS IRP_MJ_CLEANUP SUCCESS IRP_MJ_CLOSE SUCCESS ---------------------------------------------------------------------------------------------------- Case 2 USE_OLD_MODE = 1 & FILL_DCB = 0 --------------------------------------- OLD STYLE: enable PRE BUILD DCB: disable ============================== WILL TRY... ============================== DCBlength 80 BaudRate 2400 fbits 0x0012feac ByteSize 0 XonLim 0 XoffLim 3 Parity 0 XonChar 0x00 XoffChar 0x00 StopBits 0 ErrorChar 0x00 EofChar 0x00 EvtChar 0x00 Error in parameter. --------------------------------------- output from portmon.... IRP_MJ_CREATE SUCCESS Options: Open IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_SET_BAUD_RATE SUCCESS Rate: 2400 IOCTL_SERIAL_SET_LINE_CONTROL SUCCESS StopBits: 1 Parity: NONE WordLength: 8 IOCTL_SERIAL_SET_CHAR SUCCESS EOF:0 ERR:c0 BRK:c0 EVT:0 XON:0 XOFF:0 IOCTL_SERIAL_SET_HANDFLOW INVALID PARAMETER Shake:8000001a Replace:800000ce XonLimit:30695 XoffLimit:1996 IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_SET_BAUD_RATE SUCCESS Rate: 2400 IOCTL_SERIAL_SET_DTR SUCCESS IOCTL_SERIAL_SET_LINE_CONTROL SUCCESS StopBits: 1 Parity: NONE WordLength: 7 IOCTL_SERIAL_SET_CHAR SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 IOCTL_SERIAL_SET_HANDFLOW SUCCESS Shake:80000009 Replace:80000080 XonLimit:2048 XoffLimit:512 IRP_MJ_FLUSH_BUFFERS SUCCESS IRP_MJ_CLEANUP SUCCESS IRP_MJ_CLOSE SUCCESS --------------------------------------------------------------------------------------------------------------------- case 3 USE_OLD_MODE = 0 & FILL_DCB = 1 --------------------------------------- OLD STYLE: disable PRE BUILD DCB: enable ============================== WILL TRY... ============================== DCBlength 28 BaudRate 2400 fbits 0x00006095 ByteSize 8 XonLim 0 XoffLim 3 Parity 0 XonChar 0x00 XoffChar 0x00 StopBits 0 ErrorChar 0x00 EofChar 0x00 EvtChar 0x00 ============================== RESULT IS... ============================== DCBlength 28 BaudRate 2400 fbits 0x00006095 ByteSize 8 XonLim 0 XoffLim 3 Parity 0 XonChar 0x00 XoffChar 0x00 StopBits 0 ErrorChar 0x00 EofChar 0x00 EvtChar 0x00 RESET...OK! ----------------------------------------- output from portmon.... IRP_MJ_CREATE SUCCESS Options: Open IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_SET_BAUD_RATE SUCCESS Rate: 2400 IOCTL_SERIAL_SET_DTR SUCCESS IOCTL_SERIAL_SET_LINE_CONTROL SUCCESS StopBits: 1 Parity: NONE WordLength: 7 IOCTL_SERIAL_SET_CHAR SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 IOCTL_SERIAL_SET_HANDFLOW SUCCESS Shake:80000009 Replace:80000080 XonLimit:2048 XoffLimit:512 IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_SET_BAUD_RATE SUCCESS Rate: 2400 IOCTL_SERIAL_SET_DTR SUCCESS IOCTL_SERIAL_SET_LINE_CONTROL SUCCESS StopBits: 1 Parity: NONE WordLength: 7 IOCTL_SERIAL_SET_CHAR SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 IOCTL_SERIAL_SET_HANDFLOW SUCCESS Shake:80000009 Replace:80000080 XonLimit:2048 XoffLimit:512 IRP_MJ_FLUSH_BUFFERS SUCCESS IRP_MJ_CLEANUP SUCCESS IRP_MJ_CLOSE SUCCESS ----------------------------------------------------------------------------------------------------------- case 4 USE_OLD_MODE = 1 & FILL_DCB = 1 -------------------------------------- OLD STYLE: enable PRE BUILD DCB: enable ============================== WILL TRY... ============================== DCBlength 28 BaudRate 2400 fbits 0x00006095 ByteSize 0 XonLim 0 XoffLim 3 Parity 0 XonChar 0x00 XoffChar 0x00 StopBits 0 ErrorChar 0x00 EofChar 0x00 EvtChar 0x00 ============================== RESULT IS... ============================== DCBlength 28 BaudRate 2400 fbits 0x00006095 ByteSize 0 XonLim 0 XoffLim 3 Parity 0 XonChar 0x00 XoffChar 0x00 StopBits 0 ErrorChar 0x00 EofChar 0x00 EvtChar 0x00 RESET...OK! ------------------------------------------ output from portmon.... IRP_MJ_CREATE SUCCESS Options: Open IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_SET_BAUD_RATE SUCCESS Rate: 2400 IOCTL_SERIAL_SET_DTR SUCCESS IOCTL_SERIAL_SET_LINE_CONTROL SUCCESS StopBits: 1 Parity: NONE WordLength: 8 IOCTL_SERIAL_SET_CHAR SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 IOCTL_SERIAL_SET_HANDFLOW SUCCESS Shake:80000009 Replace:80000080 XonLimit:2048 XoffLimit:512 IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_GET_BAUD_RATE SUCCESS IOCTL_SERIAL_GET_LINE_CONTROL SUCCESS IOCTL_SERIAL_GET_CHARS SUCCESS IOCTL_SERIAL_GET_HANDFLOW SUCCESS IOCTL_SERIAL_SET_BAUD_RATE SUCCESS Rate: 2400 IOCTL_SERIAL_SET_DTR SUCCESS IOCTL_SERIAL_SET_LINE_CONTROL SUCCESS StopBits: 1 Parity: NONE WordLength: 7 IOCTL_SERIAL_SET_CHAR SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 IOCTL_SERIAL_SET_HANDFLOW SUCCESS Shake:80000009 Replace:80000080 XonLimit:2048 XoffLimit:512 IRP_MJ_FLUSH_BUFFERS SUCCESS IRP_MJ_CLEANUP SUCCESS IRP_MJ_CLOSE SUCCESS