On May 7, 2008, at 11:57 AM, [EMAIL PROTECTED] wrote:
> What I've been asked to do is report on whether a printer is
> physically present, and what printer it is. Note that even something
> like polling the LPTx: (or USB_x, or USBx, or COMx:) ports won't
> work, 'cause I don't think that would pick up a connected printer
> that's not turned on. Or will it? And would it be able to identify
> it? Don't think so (but I could be wrong...).
You're being asked to do the impossible. There is no difference
between no printer and a printer turned off. You couldn't tell even in
assembler language. The available options are:
Look for printer queues in the operating system (which may reflect
a long-removed printer, a virtual printer, like a PDF writer or FAX
writer, or a multi-mode printer, a printer that appears to be more
than one printer, such as one PCL and one PostScript.
Look for attached and turned-on printers. If you do this, don't
forget that printers can also connect via Ethernet, etc..
--
John W Kennedy
A proud member of the reality-based community.
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs