Is there any command that gets all the details of the device connected to the serial port ??
Actually i connect a smart card reader to a serial COM port, i send some data to it using WriteFile (), in return it gives some response, i read the response using ReadFile().
Now if i donot connect the reader and simply connect the serial cable to computers serial port i send the data to the handle of the serial port using WriteFile(), the computer(or ReadFile ()) waits infinitely for receiving response !
In order to solve above problem i use COMMTIMEOUTS, so if the specified time expires the ReadFile() executes successfully although it doesn't get the response!!
Actually i donot want to use COMMTIMEOUTS since i donot know the exact time in which the reader sends a response !!
if i use maximum delay it decreases the performance of my application, if i use completely less time delay, the ReadFile() expires even before it receives respone from the reader!!