How to detect a printer status

Posted by ruan007 on 15-Nov-2011 17:35

Hi,

Is there a way in ABL to detect if a printer is offline before outputing the data to it? If the printer is offline, i want to display a message to the user to rectify the problem.

Thanks

Kevin

All Replies

Posted by Admin on 15-Nov-2011 23:48

Platform? OpenEdge Version?

Posted by ruan007 on 16-Nov-2011 04:10

Hi Mike,

it's windows XP/7, OpenEdge 10.1B.

Ta

K

Posted by Admin on 16-Nov-2011 04:17

GUI, I assume?

I personally would solve it using .NET:

http://bytes.com/topic/visual-basic-net/answers/816382-detect-if-windows-printer-not-responding

http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/4145b44c-4084-49da-a9e5-9eb3497c9260/

For as long as you cannot upgrade to 10.2B, I'd wrap that functions into a .NET Assembly, make that COM-Enabled and use it as an automation server from Progress. As soon as you upgrade to 10.2B (everybody should be on a supported, recent platform, right?) you can use the same .NET routine without the COM workaround.

But there might be ways to solve this without .NET using DLL calls.

This thread is closed