Printer Ports

Just wondering how i can retrieve the port of the printer that i have selected from the PrintDialog
_versamps_Asked:
Who is Participating?
 
ee_ai_constructCommented:
PAQed, with points refunded (200)
ee_ai_construct - CS Mod
0
 
WVWCommented:
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
 
_versamps_Author Commented:
string sPath = "Win32_Printer.DeviceID='" + <printer name> + "'";
ManagementPath path = new ManagementPath(sPath);
ManagementObject ob = new ManagementObject (path);
string sPort = ob["PortName"].ToString ();
0
 
_versamps_Author Commented:
asked this question a while back but i figured it out .. this is the method in case u need it also
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.