带有USB打印机的DOS旧版应用程序 [英] DOS legacy application with USB printer

查看:158
本文介绍了带有USB打印机的DOS旧版应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不幸的是,我对在DBIII + / Clipper '87中开发的两个旧版应用程序进行了(最少的)维护工作。

I have the unfortunate task of doing (minimal) maintenance work on two legacy applications developed in DBIII+/Clipper '87.

我可以完全访问源代码,并且最小的工具链,可以在需要时重新编译应用程序,但是由于主要用户的各种(主要是心理上的)原因,我不允许从头开始重新实现它。

I have full access to source and a minimal toolchain to recompile the application when needed, but I am not allowed to reimplement it from scratch due to various (mostly psychological) reasons from the main user.

在XP下应用程序运行良好,硬件支持正变得越来越繁琐。用户需要更换出现故障的打印机(带有并行接口的老式HP打印机)和托管应用程序的486(!)台式机。

Anyway, while the applications work fine under XP, hardware support is becoming a chore. The user needs to replace the failing printer (an old impact HP with parallel interface) and the 486 (!) desktop where the applications are hosted.

现在的主要问题是找到可以在XP下使用的打印机,可能可以通过USB(Asus EEE Box是完美的,并且没有并行端口)并使它对DOS应用程序可见。

The main problem now is to find a printer which can be used under XP, possibly through USB (an Asus EEE Box would be perfect, and it does not sports a parallel port) and make it "visible" to the DOS applications.

到目前为止,我已经找到一种解决方法:

So far I have found a workaround:

http://geekswithblogs.net/dtotzke/articles/26204.aspx

外加一些实用程序:

http://www.dosprn.com/
http://www.dos2usb.com/index.htm
http://www.printfil.com/english.htm

实用程序似乎更好,因为它们提供了一些一种用于旧转义序列的过滤器(例如,用于Epson的ESC / P或HP方言),使该过滤器对打印机透明。
至少他们这样说。

The utilities seem better because they offer some kind of filter for the old escape sequences (like ESC/P for Epson or the HP dialect) making this transparent to the printer. Or so they say, at least.

所以问题是:有人在将旧的DOS程序与XP下的现代打印机接口方面有经验吗?有什么需要注意的吗?您是否使用了列出的实用程序之一(或者我还没有找到的另一个实用程序),如果是,您会推荐哪一种?

So the question is: has anyone some experience about interfacing old DOS programs with modern printers under XP? Any caveats? Did you use one of the listed utilities (or another one I didn't find yet) and if yes, which one would you reccomend?

推荐答案

我们通常完全按照您的链接之一提及。也就是说,将打印机安装在Windows下要安装的端口上(例如USB等)。

We typically do exactly what one of your links mentions. That is, install the printer under Windows on whatever port it wants to install itself on (ie: USB etc.).

下一步,共享打印机(假设工作站称为COMPUTER1,您的份额为HPPRINTER。)

Next, share the printer (let's say the workstation is called COMPUTER1 and your share is HPPRINTER).

接下来创建一个批处理文件以启动该应用程序,它应该类似于以下内容:

Next create a batch file to launch the app, it should look something like this:

net use lpt1 /d
net use lpt1 \\COMPUTER1\HPPRINTER
<yourapp.exe>

在您的应用程序中,将输出设置为LPT1。

In your app set the output to LPT1.

还有其他更复杂的解决方案,但这是最简单的。我们仍然有一个多年前构建的DOS应用程序,我们仍然在积极进行市场销售。这就是我们处理打印的方式。效果很好。您还可以获得现在使用Windows排队打印作业的更多好处,因此可以暂停打印机队列等。打印机甚至可以关闭或缺纸,并且作业仍在Windows后台打印程序中排队。

There are other, more complex solutions, but this is by far the simpliest. We still have a DOS app that was built years ago that we still actively market and sell. This is how we handle print. It works very well. You also get the added benefit of now using Windows to queue your print jobs so you can pause the printer queue etc. The printer can even be off or out of paper and the jobs still queue up in the Windows spooler.

注意:这假定新打印机将支持输出。如果它是较旧的 HP LaserJet,则可能是PCL5,只需找到支持PCL5的设备即可。

Caveat: This assumes that the output will be supported by the new printer. If it's an 'older' HP LaserJet then it's probably PCL5, just find a device that supports PCL5 and away you go.

在过滤方面,不确定为什么需要这样做。只要输出是PCL或Postscript或其他标准,那么您仍然应该能够找到支持该打印描述语言的打印机。如果您有任何疑问,只需添加有关当前设备的评论即可,我们每天都会处理有关兼容性的问题。

In terms of filtering, not sure why you'd need this. As long as the output is PCL or Postscript, or some other standard then you should still be able to find a printer that supports that print description language. If you have concerns just add comment regarding the current device and I can provide ideas as to compatability as we deal with this daily.

这篇关于带有USB打印机的DOS旧版应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆