IOCTL_SERIAL_SET_HANDFLOW - Serial Programming

THT

THT

Associate
Joined
10 Mar 2004
Posts
998
Right,

My brain hurts!

Im trying to emulate an existing program which writes to the serial port.

The program does this (according to portmon)
Code:
0.00000307	LED.exe	IOCTL_SERIAL_SET_HANDFLOW	Serial0	SUCCESS	Shake:80000001 Replace:80000043 XonLimit:2048 XoffLimit:512

My program does:

Code:
0.00000335	LED.exe	IOCTL_SERIAL_SET_HANDFLOW	Serial0	SUCCESS	Shake:19 Replace:43 XonLimit:2048 XoffLimit:512

As you can see the Shake and Replace values are different.

I think its due to the options im putting into the dcb structure:
Code:
		dcb.fOutxCtsFlow = true;					// Enable CTS monitoring
		dcb.fOutxDsrFlow = true;					// Enable DSR monitoring
		dcb.fDtrControl = DTR_CONTROL_DISABLE;	// Enable DTR handshaking
		dcb.fOutX = true;							// Disable XON/XOFF for transmission
		dcb.fInX = true;							// Disable XON/XOFF for receiving
		dcb.fRtsControl = RTS_CONTROL_TOGGLE;	// Enable RTS handshaking

Im trying my best to get this to be the same (not really sure how important it is though :S )

Any help from a kind person?
 
Back
Top Bottom