Test USB being Connected

J

Jim Hubbard

Does anyone know how to see if a USB printer is actually attached to a WIN2k
or XP machine.

I am using vba, vb or perhaps vb.ney if needed.....

I tried using the GetPrinter API

Private Declare Function GetPrinter Lib "winspool.drv" _
Alias "GetPrinterA" (ByVal hPrinter As Long, _
ByVal Level As Long, pPrinter As Any, _
ByVal cbBuf As Long, pcbNeeded As Long) As Long

followed this example

http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=183

The problem is the Printers are always "Ready" status even if they are
disconnected.

I know it must be capable, as the icon will dim out when you unplug it.....


Help......

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Macro to print document in Duplex format 0
Macro -duplex printing 2
Printer Duplex 3
Word Printing Macro 0
Duplex printing problems. 3
PRINTING VIA API - ACCESS 2000 3
VB and VBA 0
Print with VBA 4

Top