0

Have anyone experience using "DeviceIoControl", this functions seems to be a way an application can do IO control (IOCTL) which is generally set for Driver for example:

IOCTL_SERIAL_SET_QUEUE_SIZE
IOCTL_SERIAL_SET_LINE_CONTROL       
IOCTL_SERIAL_SET_CHAR   

I have a software communicating with modem, when I monitored with portmon(serial port monitoring tool), I saw that software is setting the above three parameter, I am writing that software of my own in c++, but I couldn't found any thing from where i can start. If any one having experience using this, please help me, if needed, i can brief more about this project.

dsolimano
  • 8,870
  • 3
  • 48
  • 63
  • These IOCTLs are used by documented winapi functions. Which is what you should always use. Use SetCommState() instead. – Hans Passant May 13 '14 at 17:37
  • But i could not figure out how to set these two. this is the portmon output for the software i am using, but how can i set these IOCTL_SERIAL_SET_QUEUE_SIZE VSerial7_0 SUCCESS InSize: 16384 OutSize: 16384 and IOCTL_SERIAL_SET_TIMEOUTS VSerial7_0 SUCCESS RI:-1 RM:0 RC:0 WM:0 WC:65000, these two are not inside setcommstate() – Satya Sankar May 14 '14 at 05:51
  • Here is the MSDN link for above http://msdn.microsoft.com/en-us/library/windows/desktop/aa363216(v=vs.85).aspx – Satya Sankar May 14 '14 at 06:07
  • SetupComm() and SetCommTimeouts(). Use [the fish](http://msdn.microsoft.com/en-us/library/windows/desktop/aa363194%28v=vs.85%29.aspx). – Hans Passant May 14 '14 at 06:07

0 Answers0