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?
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:
Anonymous2010-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.