ClearCommError+LPT

E

Erwin Springer

hi all,
i am facing a problem while accessing external ports in Win2k.
i am porting an application from W95 to W2k which writes to a line printer using
CreateFile ("LPT1", ...), some initialisation and WriteFile (...). to gather
error-information (like out-of-paper) i use ClearCommError (...).
in win95, everything worked fine.
in Win2k, the following functions return FALSE with a GetLastError() of 87
(ERROR_INVALID_PARAMETER) when used on an LPT:
- ClearCommError ()
- SetupComm ()
- GetCommState ()
- SetCommState ()

the weird thing is: when i use a serial port (CreateFile ("COM1", ...) these
functions return TRUE in Win2k as well...

so how can i write to an LPT directly and check for printer-errors?

anyone any ideas?

thanx in advance,
erwin
--
---------------------------------------
acoustic-interfaces
Springer und Hirzer EDV OEG

Erwin Springer
www.acoustic-interfaces.at
mailto:[email protected]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top