How to read response from network printer


Joined
Nov 4, 2011
Messages
2
Reaction score
0
Hi

I have written a language monitor to print and get status from my LAN printer. I am able to print on my LAN printer; however I am not able to read response sent by the printers. I am using wireshark (LAN monitor s/w) and I can see printer has responded to my command in wireshark (LAN monitor s/w), but when I go to read response by using "fn.pfnReadPort" port monitor - it returns with zero bytes read.

Before sending the command to the printer I call "fn.pfnStartDocPort" port monitor function, then “fn.pfnWritePort" to send then command and finally "fn.pfnReadPort" to read the response.

fn.pfnReadPort fails with error code 50 “The request is not supported.” – It seems we should not use fn.pfnReadPort (port monitor) to read response over LAN.

When I created network port I had selected Device type as Standard -->"Generic Network Card"

I also tried configuring printer as described in http://uis.georgetown.edu/software/d...k.printer.html
but then also it didn't work.

After configuring the printer as described in above the link - I changed "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\<Printer Name>\Monitor" to My monitor name.

Please suggest me, how to read response from printer.

Regards,
Suman
 
Ad

Advertisements


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