CodeSculptor
Newcomer
- Joined
- Jun 21, 2006
- Messages
- 1
We have an old DOS-based print queuing program that we need to port to Windows. The conversion is necessary because we have a very large DOS based business application that must work under Windows 2000 or XP. The business application prints directly to LPT1, LPT2, or LPT3, and unfortunately we cannot convert it to use windows printing because it is too large to rewrite and incorporates too many 16 bit libraries to convert. By itself, the business application works except it prints directly to printers mapped to LPT1/2/3 since the queuing program we use is not W2K compliant. The queuing program would normally capture the data bound for these printer ports so that we can print them from other locations, write them to files, put online, etc.
The problem is that we dont know how to intercept files bound for the standard printer ports. For example, if we were to type:
echo Hello > lpt1
at a command prompt in Windows 2000, wed want the new queuing application to intercept this stream so that we print the statement on any HP printer we want later (our business application only uses HP PCL when printing to a printer port). Same thing if we do an fprintf to the printer port from the business application.
Is there an easy way to do this?
The problem is that we dont know how to intercept files bound for the standard printer ports. For example, if we were to type:
echo Hello > lpt1
at a command prompt in Windows 2000, wed want the new queuing application to intercept this stream so that we print the statement on any HP printer we want later (our business application only uses HP PCL when printing to a printer port). Same thing if we do an fprintf to the printer port from the business application.
Is there an easy way to do this?