473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Printer port solution?

Hi,

I have a process system that generate events and send them to a printer
port, and in the end a printer writes it as a text line on a paper.

I would like to chatch this text line programatically and process it in my
little application. I would like to know if there are any "Microsoft" objects
or functions to use to get hold of the printer port and the text that comes
from the process ie read the printer port.

Links to tutorials, help files or any other information about this subject
would be much appreachiated

Thanks in advance
Joca
Nov 16 '05 #1
3 5433
Hi,

Are you really required to use .NET for your task? From what you say, I'd
rather say you need to create a device driver to intercept LPT port
communication - and this is definitely C++ and/or Assembler language. You
can however use the Framework to write the processing application itself,
but as for working with the printer port, you should probably refer to
Windows DDK.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Joca" <Jo**@discussions.microsoft.com> wrote in message
news:C5**********************************@microsof t.com...
Hi,

I have a process system that generate events and send them to a printer
port, and in the end a printer writes it as a text line on a paper.

I would like to chatch this text line programatically and process it in my
little application. I would like to know if there are any "Microsoft"
objects
or functions to use to get hold of the printer port and the text that
comes
from the process ie read the printer port.

Links to tutorials, help files or any other information about this subject
would be much appreachiated

Thanks in advance
Joca


Nov 16 '05 #2
Hi Joca.

I've actually written exactly this for someone once. I had to sign a
NDA so I can't give you the code or any samples.

However, you have to use the DDK for your operating system. For
instance if you use WinXP, you need WinXPDDK. The ddk provides example
of print and one in particular that you need to look at is called
genprint. What this means is that you write a driver that captures all
data sent to the printer and if you want to do something with that
data, then you have to send that data to your app.

These links should give u a good start for learning about print
interception. More specifically look into Print Processors.

General Print DDK Information - Good Beginners Guide.
http://msdn.microsoft.com/library/de...49b7f2.xml.asp
Print Processors DDK Information
http://msdn.microsoft.com/library/de...d22815.xml.asp

Mild Discussion on Print Interception
http://www.osronline.com/lists_archi...hread5378.html

If you do a search on GOOGLE GROUPS for genprint, you should see tons
of information on there. I believe that I looked at all the messages
dealing with Print Processors and genprint before I wrote my
component.

By the way, the DDK is available from MS and its quite expensive. If
you have a MSDN Subscribers Download account then you should be ok.
If you have any other questions and if I can help, don't hesitate to
ask...worst case, someone else might be able to give u further
insight. :-)

Sushant
Nov 16 '05 #3
Many Thanks,

Really nice to know that there are people out there that are so kind and
helpful. I will probably be back with more questions..... perhaps in some
other forum (C++)...

Thanks again
Joca

"Sushant Bhatia" wrote:
Hi Joca.

I've actually written exactly this for someone once. I had to sign a
NDA so I can't give you the code or any samples.

However, you have to use the DDK for your operating system. For
instance if you use WinXP, you need WinXPDDK. The ddk provides example
of print and one in particular that you need to look at is called
genprint. What this means is that you write a driver that captures all
data sent to the printer and if you want to do something with that
data, then you have to send that data to your app.

These links should give u a good start for learning about print
interception. More specifically look into Print Processors.

General Print DDK Information - Good Beginners Guide.
http://msdn.microsoft.com/library/de...49b7f2.xml.asp
Print Processors DDK Information
http://msdn.microsoft.com/library/de...d22815.xml.asp

Mild Discussion on Print Interception
http://www.osronline.com/lists_archi...hread5378.html

If you do a search on GOOGLE GROUPS for genprint, you should see tons
of information on there. I believe that I looked at all the messages
dealing with Print Processors and genprint before I wrote my
component.

By the way, the DDK is available from MS and its quite expensive. If
you have a MSDN Subscribers Download account then you should be ok.
If you have any other questions and if I can help, don't hesitate to
ask...worst case, someone else might be able to give u further
insight. :-)

Sushant

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Lizard King | last post by:
Hi. I have a computer running a third party software (POS). The thing is this application opens the printer port and I need to use another program while the first one is still running. Since...
1
by: Bow Hunter | last post by:
Greetings! Is there a way to send data to and read it directly from the parallel printer port using VB6? We did this years ago on a 8088 using assembly language. I need to be able to set each bit...
0
by: Soon Lee | last post by:
Hi all any one know of any ways to read and write to a printer port using vb.net Please kindly enlighten me Thank you -- WebSite : http://soonlee.agreatserver.com
6
by: Bradley1234 | last post by:
What is the way to send/read bits to the printer port at the hex 3F8-3FF or any other legacy io space?? Does C# include the methods to drive the printer or other ports? tia
0
by: Gustavo | last post by:
Hy everybody !! C# allow me to develop a printer port monitor ? If yes have You a good place to look for samples and information ? Thanks Gustavo
0
by: H. Williams | last post by:
Is it possible to create a new printer port at runtime and then set a printer to the new port?
4
by: Terry Olsen | last post by:
I need to create a file printer port. I can do it using the PRNADMIN.DLL like so: Public Sub CreateFilePort(ByVal FilePath As String) Dim PRNADMIN As New PRNADMINLib.PrintMaster Dim port As New...
4
by: jimatqsi | last post by:
I am trying to print UPS shipping labels using a Zebra label printer. Apparently these printers have the label form programmed into the firmware and all I have to do is send a particular string of...
1
by: JAYATHILAKA | last post by:
pls Help me to Liting a LED using Printer Port, & VB6.0 IF u can send method.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.