PC Review


Reply
Thread Tools Rate Thread

ClearCommError+LPT

 
 
Erwin Springer
Guest
Posts: n/a
 
      11th Aug 2004
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
private.php?do=newpm&u=

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:39 PM.