Serial port problem

Hi all,
I need to communicate with a printer through serial port and
query the printer configuartion.When I install the printer for the first
time, it is not communicating with the printer. While debugging ,I found
GetCommState()and other functions are failing. But when I disable and
enable the COM port in device manager it is working (queries the printer
and gives the result,GetCommState also got succeed).

Regards
Hari

Hi,

You can use Portmon from sysinternals.com to look at the IO requests that
are going to your printer during installation to see what is failing. I
would assume you are using the serial.sys driver. Check that if you stop
and start the printer spooler service has the same effect as the disable and
enable from within Device Manager and the printer works. I do not know why
without more info.

-William Michael Jones “Mike”

wrote in message news:xxxxx@ntdev…

Hi all,
I need to communicate with a printer through serial port and
query the printer configuartion.When I install the printer for the first
time, it is not communicating with the printer. While debugging ,I found
GetCommState()and other functions are failing. But when I disable and
enable the COM port in device manager it is working (queries the printer
and gives the result,GetCommState also got succeed).

Regards
Hari