Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > How to determine the printer port?

Reply
Thread Tools Display Modes

How to determine the printer port?

 
 
Tim D
Guest
Posts: n/a

 
      09-27-2004
How can I determine the port that a printer is connected to? For example
during a printer driver installation program I want to be able to determine
if the printer is connected to LPT1 or USB004 or whatever parallel or usb
port the particular printer that is being installed may be connected to.
Also, if a "Virtual printer port for USB" is not already created for the
printer then create one.

Any ideas?

Thanks!
 
Reply With Quote
 
 
 
 
Matt Kane
Guest
Posts: n/a

 
      09-27-2004
EnumPrinters with the appropriate flags and level = 2
OR
GetPrinter with level 2 if you already have a handle to it.
"Tim D" wrote:

> How can I determine the port that a printer is connected to? For example
> during a printer driver installation program I want to be able to determine
> if the printer is connected to LPT1 or USB004 or whatever parallel or usb
> port the particular printer that is being installed may be connected to.
> Also, if a "Virtual printer port for USB" is not already created for the
> printer then create one.
>
> Any ideas?
>
> Thanks!

 
Reply With Quote
 
 
 
 
Tim D
Guest
Posts: n/a

 
      09-28-2004
I failed to mention that the printer is not installed yet. This is a
driver/printer installation program.

I found out that using UpdateDriverForPlugAndPlayDevices will work to
install the printer on whatever port it is connected to and so I don't really
need to know what port using this method. After the printer is installed your
method would work fine, thanks for the info.

"Matt Kane" wrote:

> EnumPrinters with the appropriate flags and level = 2
> OR
> GetPrinter with level 2 if you already have a handle to it.
> "Tim D" wrote:
>
> > How can I determine the port that a printer is connected to? For example
> > during a printer driver installation program I want to be able to determine
> > if the printer is connected to LPT1 or USB004 or whatever parallel or usb
> > port the particular printer that is being installed may be connected to.
> > Also, if a "Virtual printer port for USB" is not already created for the
> > printer then create one.
> >
> > Any ideas?
> >
> > Thanks!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Can I determine if an installed printer driver is WHQL-signed? How? Pavel A. Windows Vista Drivers 0 12-16-2009 05:25 PM
Re: Can I determine if an installed printer driver is WHQL-signed? How? Kerem Gümrükcü Windows Vista Drivers 0 12-16-2009 05:14 AM
Unable to view printer properties, unable to add printer to Printer Management g Windows Small Business Server 2 01-30-2007 10:31 PM
"Setup cannot determine if this computer supprts installation." Jonathan Dewar Windows Vista Installation 10 09-12-2006 01:06 AM
How do I determine a Print Processor for a Printer Driver? Hardascii Windows Vista Drivers 2 05-26-2006 06:21 PM