473,327 Members | 2,094 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,327 software developers and data experts.

step in-between printer (LPT)

I need to develop some software that will step in between a computer
and it's printer. The software should read from one LPT port
(connected to printing computer) and then redirect that traffic out a
second LPT port (connected to printer). It will do stuff to the data
as it goes by. Can you give me any direction on what is needed to
develop this? How do I read/write to/from the LPT port in Windows?
Are there any libraries available that can manage the communications?
Do I need to develop a driver to do this?

Thanks!

Nov 22 '05 #1
14 2794
we**********@gmail.com writes:
I need to develop some software that will step in between a computer
and it's printer. The software should read from one LPT port
(connected to printing computer) and then redirect that traffic out a
second LPT port (connected to printer).

[...]

This is off-topic in (at least) comp.lang.c and comp.lang.c++.
(Cross-posting to five newsgroups is rarely a good idea.)

Followups redirected.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 22 '05 #3
There is a Port Monitoring section under the DDK. That might help.

http://msdn.microsoft.com/library/de...asp?frame=true

This is an example of how to redirect a printer job to a file, instead of
the physical printer it was going to:

http://www.codeguru.com/Cpp/W-P/prin...icle.php/c5893

AliR.
<we**********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
I need to develop some software that will step in between a computer
and it's printer. The software should read from one LPT port
(connected to printing computer) and then redirect that traffic out a
second LPT port (connected to printer). It will do stuff to the data
as it goes by. Can you give me any direction on what is needed to
develop this? How do I read/write to/from the LPT port in Windows?
Are there any libraries available that can manage the communications?
Do I need to develop a driver to do this?

Thanks!

Nov 22 '05 #4
we**********@gmail.com wrote:

<snip>
develop this? How do I read/write to/from the LPT port in Windows?
Are there any libraries available that can manage the communications?
Do I need to develop a driver to do this?


This is all highly system specific and therefore not topical in
comp.lang.c or comp.lang.c++ so please keep all replies out of these groups.

Followups set.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Nov 22 '05 #5
On 21 Nov 2005 10:36:25 -0800, "Kellie Fitton"
<KE**********@YAHOO.COM> wrote:
Hi,

You can use the following API's to handle the parallel port:

CreateFile()
GetCommState()
BuildCommDCB()
SetCommState()
GetCommTimeouts()
SetCommTimeouts()
ReadFile()
WriteFile()
CloseHandle()
CancelIo()
ClearCommError()
FlushFileBuffers()


<snip>

Kellie, it sounds like you are thinking of the *serial* port here.
Or is there some tricky way to use DCBs and other comm stuff
with a parallel port?

In particular, I am interested in being able to read port status
lines. I don't much care which line, just some way to be able
to read a digital state. (No physical printer.) I am aware of
special installable drivers like GiveIO for port access, but that
seems like overkill if there is some easy Windows API.

Many thanks!

Bob Masta
dqatechATdaqartaDOTcom

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Home of DaqGen, the FREEWARE signal generator
Nov 24 '05 #6
Bob Masta wrote:

<snip>
seems like overkill if there is some easy Windows API.


Please take comp.lang.c and comp.lang.c++ OFF the cross post list as
both myself and Keith requested days ago. I would be very surprised if
neither of out posts requesting this reached you, since they definitely
left our servers and got as far as Google.

Windows specific, Unix specifics, and any other system specifics are OFF
topic in both comp.lang.c and comp.lang.c++

Follow-ups set again.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Nov 24 '05 #7
Hi Bob,

If you are trying to communicate with a printer/device that is
biDirectional and supports IEEE1284, for reading you have several
options depending on your port hardWare:

1). Nibble mode
2). Byte mode
3). Fast byte mode with hardWare handShake

The Win32 API's that build/set the DCB structure are used mainly
to reinitialize all hardWare and control settings on the machine,
for example the member ByteSize (number of bits/byte, 4-8), and to
set only a few members of the DCB structure, you should modify the
structure that has been filled in by using the following API's:

GetCommState()
BuildCommDCB()
SetCommState()

Additionally, you should take a look at the Windows Driver Kit,
in particular the Internal Device Control Requests for Parallel
Ports, case in point:

DeviceIoControl()

IOCTL_INTERNAL_GET_MORE_PARALLEL_PORT_INFO
IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO
IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO

http://msdn.microsoft.com/library/de...eiocontrol.asp

http://msdn.microsoft.com/library/de...234cad.xml.asp

Hope these information helps,

Kellie.

Nov 25 '05 #8
Kellie Fitton wrote:
Hi Bob,

If you are trying to communicate with a printer/device that is
biDirectional and supports IEEE1284, for reading you have several
options depending on your port hardWare:


<snip off topic rubbish>

How often do I have to say in the same damn thread, KEEP THIS SYSTEM
SPECIFIC STUFF OFF comp.lang.c and comp.lang.c++!

You have absolutely NO excuse for failing to see the previous polite
requests, since they are plainly visible in Google Groups, and you are
posting from Google groups.

Look at
http://groups.google.co.uk/group/com...4fc503a9633784

Three POLITE requests, one above from the day BEFORE you posted and TWO
below from THREE DAYS before you posted. I know damn well that the ones
from three days ago were visible in Google groups BEFORE you posted.

Follow ups set AGAIN!
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Nov 25 '05 #9
* Kellie Fitton:
[off-topic ramble]


Hi Kellie. You're of great help in Microsoft groups; your lists of
relevant API functions are setting the standard for others. But please
don't post off-topic in clc and clc++: trim the group-list, honor FUTs.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Nov 25 '05 #10
Flash Gordon <sp**@flash-gordon.me.uk> writes:
[...]
Three POLITE requests, one above from the day BEFORE you posted and
TWO below from THREE DAYS before you posted. I know damn well that the
ones from three days ago were visible in Google groups BEFORE you
posted.

Follow ups set AGAIN!


Followups unset because I'm not discussing the original question.

It occurs to me that setting followups on a response that asks people
to post only to appropriate newsgroups is of limited utility. Anybody
participating in the discussion is going to post a followup to the
original article or to a relevant response, not to one requesting
proper followups. Readers *should* read the entire thread before
responding, and the original poster should post only to relevant
newsgroups, but once the error has been made it's difficult to correct
it, and many readers probably don't know how to adjust headers anyway.
The only real solution would be to go back to the orginal article and
correct its Followup-To: header, but there's no way to do that.

I think the continued followups to comp.lang.c and comp.lang.c++ are
the result of understandable carelessness, not malice.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 25 '05 #11
Hi Red Floyd, Flash Gordon, Alf Steinbach,

I am really sorry for the multiple posting in these newsGroups,
however, it is not my fault, I have tried to trim or remove the
additional newsGroup names but withOut any luck. I am posting
multiple this time just to say I am sorry again.

Kellie. :--))

Nov 25 '05 #12
Find a new reader or get some help. Some newsgroup types get real upset if
someone violates their 'rules'. This rule is fairly common and even makes
sense. I prefer top post and only rag on bottom posters if I see them
pushing it as the only way it should be done. If you are following a thread
in a news reader, all you need from the next post is the new stuff and
having to scroll to the end is a real pain - IMHO (or not so humble).

"Kellie Fitton" <KE**********@YAHOO.COM> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi Red Floyd, Flash Gordon, Alf Steinbach,

I am really sorry for the multiple posting in these newsGroups,
however, it is not my fault, I have tried to trim or remove the
additional newsGroup names but withOut any luck. I am posting
multiple this time just to say I am sorry again.

Kellie. :--))

Nov 26 '05 #13
David J. Craig wrote:
"Kellie Fitton" <KE**********@YAHOO.COM> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi Red Floyd, Flash Gordon, Alf Steinbach,

I am really sorry for the multiple posting in these newsGroups,
however, it is not my fault, I have tried to trim or remove the
additional newsGroup names but withOut any luck. I am posting
multiple this time just to say I am sorry again.

Find a new reader or get some help. Some newsgroup types get real
upset if someone violates their 'rules'. This rule is fairly common
and even makes sense. I prefer top post and only rag on bottom
posters if I see them pushing it as the only way it should be done.
If you are following a thread in a news reader, all you need from the
next post is the new stuff and having to scroll to the end is a real
pain - IMHO (or not so humble).

Yes, exactly. The way to get this mess over crossposting out of our
collective systems is to start a flame about top vs. bottom posting...
or not. :-D

Followups to alt.dev.null, where crossposts go to die.

S.
Nov 26 '05 #14
David J. Craig said:
If you are following a
thread in a news reader, all you need from the next post is the new stuff
and having to scroll to the end is a real pain - IMHO (or not so humble).


If the new stuff is all you need to read, all the rest should be snipped,
except for directly relevant context, which need only be very short, as in
this example. Where context is provided, it makes sense for it to precede
the reply - again as in this example.

If you must top-post, at least have the decency to snip out all the
irrelevant stuff, instead of chewing up everybody's bandwidth for no reason
whatsoever.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Nov 26 '05 #15

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

Similar topics

3
by: Gordon Watts | last post by:
Hi there, I've got a special header file which I run an small external program over to produce a .cpp file that I want to have my project build. The special header file includes a second header...
0
by: Edi | last post by:
I want to debug my application and for that I use the step into debug command button. When I click on the step into command the next step ist executed. The executed step raises some events. Now I...
2
by: Popoxinhxan | last post by:
Hi all, I am a newbie for web service and i would like to develop the web service directory like uddi or strikeiron.com based on the web service technology. COuld any one show me step by step to do...
9
by: ibm_97 | last post by:
Hi, Anyone can give me a link which shows how to setup DB2 (v8) replication step by step? Thanks. As a non-DB2 person, I find out IBM DB2 doc is not very helpful at all, espeically compare...
15
by: baumann | last post by:
Hi all, I have one simple program: #define __EXTENSIONS__ #include <stdio.h> #include <string.h> int main() {
2
by: Roy in | last post by:
I need a step by step example of publishing my crappy aspx pages to a webserver. Thank you very much
2
by: Nijazi Halimaji | last post by:
Hi newsgroup I am going to create a windows service for my first time. Is there a good step by step documentation. From programming, specialities to installing on a machine. Thanks for every...
8
by: Frank | last post by:
Hi, with vb6 it was possible to step through the code by pressing F8. Is this still possible with .net 2003? Thanks, Frank
27
by: Julien Fiore | last post by:
Do you wand to install Pyrex on Windows ? Here is a step-by-step guide explaining: A) how to install Pyrex on Windows XP. B) how to compile a Pyrex module. Julien Fiore, U. of Geneva
0
by: vijaykumars | last post by:
We are using DB28.2 for Tivoli data warehouse and our ITM for Oracle(on HACMP Cluster) uses Oracle 9i. We installed Warehouse Enablement Pack (WEP / ETL) for the ITM. But When running the step...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.