Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

RS232

Name: Anonymous 2010-01-30 13:49

Sup /prog/. I wrote a small program to work with RS232 (COM) port. But it only works when I run the program HyperTerminal. Otherwise, it stops at the ReadFile (). Why?

Name: Anonymous 2010-01-30 15:00

No idea, but you should debug it like every other Win32 program, start with GetLastError and if that isn't enough, use a full-fledged debugger.

Name: Anonymous 2010-01-30 15:27

In the debugger COM-port, I found the flags are set HyperTerminal, and I can not set, such as
IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_GET_HANDFLOW: Retrieve handshake information)
IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_SET_TIMEOUTS: Set timeouts)
IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_WAIT_ON_MASK: Wait for event)
I think if I will set them, it will work.

Name: Anonymous 2011-02-18 20:06


Don't change these.
Name: Email:
Entire Thread Thread List