Solved

Printer Ports

Posted on 2003-11-09
5
261 Views
Last Modified: 2010-04-16
Just wondering how i can retrieve the port of the printer that i have selected from the PrintDialog
0
Comment
Question by:_versamps_
  • 2
5 Comments
 

Expert Comment

by:WVW
ID: 9763007
I would also like to know this, Msdn has a wealth of information but i cant find anything to do with the status of a printer
0
 

Author Comment

by:_versamps_
ID: 10519968
string sPath = "Win32_Printer.DeviceID='" + <printer name> + "'";
ManagementPath path = new ManagementPath(sPath);
ManagementObject ob = new ManagementObject (path);
string sPort = ob["PortName"].ToString ();
0
 

Author Comment

by:_versamps_
ID: 10519972
asked this question a while back but i figured it out .. this is the method in case u need it also
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 11747192
PAQed, with points refunded (200)
ee_ai_construct - CS Mod
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

939 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now