Re: serial port communuication



In message <OmuisKHUHHA.4028@xxxxxxxxxxxxxxxxxxxx>, Ian Semmel <anyone@xxxxxxxxxxxxxxxxx> writes
Are you using SetCommState on the port ?

If so, are you first doing a GetCommState ? This sets up the DCB structure to valid values

"hari" <haricibi83@xxxxxxxxx> wrote in message news:1171455246.402743.203120@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all,

I m communicating to a printer device through serial port.It
is failing to open the port,but when I disable and enable the com port
in device manager,it works fine(i.e)it communicates with the printer
and reads the configuration settings of the printer).


Regards
Hari


I would be wary of using/trusting GetCommState(), lots of people seem to have problems with this function, see other threads/newsgroups.

--
Fenster
.



Relevant Pages

  • Re: serial port communuication
    ... This sets up the DCB structure to valid values ... "hari" wrote in message ... I m communicating to a printer device through serial port.It ...
    (microsoft.public.vc.mfc)
  • Re: serial port communuication
    ... you can use::GetLastError to find out why it is failing ... "hari" wrote in message ... I m communicating to a printer device through serial port.It ...
    (microsoft.public.vc.mfc)
  • Re: serial port communuication
    ... Are you using SetCommState on the port? ... "hari" wrote in message ... I m communicating to a printer device through serial port.It ...
    (microsoft.public.vc.mfc)
  • Re: serial port communuication
    ... I m communicating to a printer device through serial port.It ... is failing to open the port,but when I disable and enable the com port ...
    (microsoft.public.vc.mfc)
  • Serial port communication
    ... I m communicating to a printer device through serial port(i.e ... some action in UI should query the printer).It is failing to open the ...
    (microsoft.public.win32.programmer.ui)

Loading