Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

communication with LPT1 port

Status
Not open for further replies.

mullish

Programmer
Mar 14, 2002
1
IN
hi,

I am writing a utility which needs to communicate with the printer which is connected to parallel port(LPT1).

Using the utility I can request the printer to send the current settings of the printer or I can request the printer to accept the new settings.

The protocol has been developed and it has been successfully implemented in DOS( Turbo C++, biosprint() function).

when we tried to migrate the utility to windows using MSVC++, we got stuck up with the port communication module.

We are using 'CreatFile()' , WriteFile() and ReadFile() functions.

CreateFile() and WriteFile() are working file with printer. We are able to print some thing to printer using WriteFile(). But ReadFile() is not working. It is giving the status of printer. e.g. If Paper is out , the return value for ReadFile() is not reflecting this.

Please give me some information on how to read values from LPT1.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top