我如何知道打印机是否已连接?

问题描述:

大家好,

在我的项目中,我使用的是CPrintinfo,它工作正常.

但是如何知道打印机是否已连接到我的PC?

是否有任何包含信息的变量?

在此先感谢.

Hello everyone,

In my project I am using CPrintinfo and it works fine.

But how do I know that printer is connected or not to my pc?

Is there any variable that contains information?

Thanks in advance.

但是我怎么知道打印机是否连接到我的电脑.

好吧,CP中的这篇文章应该对您有所帮助:

http://www.codeproject.com/KB/printing/printeroffline.aspx#xx3452398xx [ ^ ]

更新:

抱歉,我没有看到C ++标记.

但是我发现了一些链接:

- ^ ]

- http://www.codeguru.com/forum/archive/index.php/t -2739.html [ ^ ]

- http://*.com/questions/176332/monitoring-a-printer [ ^ ]

- http://www.0x61.com/forum/microsoft-visual-c-f203/how-to-check-the-status-of-a-printer-t163518.html [
But how do i know that printer is connected or not to my pc.

Well this article in CP should help you :

http://www.codeproject.com/KB/printing/printeroffline.aspx#xx3452398xx[^]

UPDATE :

Sorry I didn''t see the C++ tag.

However I found some links :

- http://books.google.co.in/books?id=lt9660Apj8EC&pg=PA135&lpg=PA135&dq=whether+printer+is+connected+in+C%2B%2B&source=bl&ots=F1Fu1FVqkt&sig=A8uQBCnlO14LsNBarQwLM8N8YkA&hl=en&ei=L-arTa7eI6230QG069z5CA&sa=X&oi=book_result&ct=result&resnum=1&ved=0CBUQ6AEwADgK#v=onepage&q&f=false[^]

- http://www.codeguru.com/forum/archive/index.php/t-2739.html[^]

- http://*.com/questions/176332/monitoring-a-printer[^]

- http://www.0x61.com/forum/microsoft-visual-c-f203/how-to-check-the-status-of-a-printer-t163518.html[^]


http://support.microsoft.com/kb/160129
http://support.microsoft.com/kb/160129