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]
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]