Унаследованное приложение DOS с принтером USB

Нужно отметить, что производительность регулярных выражений начиная с.NET 2.0 была улучшена с кэшем MRU нескомпилированных регулярных выражений. Код библиотеки Regex больше не дает иное толкование тому же нескомпилированному регулярному выражению каждый раз.

, Таким образом, существует потенциально большая производительность штраф со скомпилированным и динамическим регулярным выражением. В дополнение к более медленному времени загрузки система также использует больше памяти для компиляции регулярного выражения в коды операций.

По существу, текущий совет, или не компилируйте регулярное выражение или компилируйте их заранее в отдельный блок.

Касательно: производительность Регулярного выражения Блога Команды BCL [David Gutierrez]

6
задан p.marino 19 October 2009 в 09:45
поделиться

1 ответ

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.).

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>

In your app set the output to LPT1.

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.

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.

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.

5
ответ дан 17 December 2019 в 04:48
поделиться
Другие вопросы по тегам:

Похожие вопросы: