0
Answer

Printer Management

mostert

mostert

19y
2.3k
1
Hey, im busy writing a print server which needs to obviously be able to add printers, current i can add the printer port bu i cant delete ports or get a handle to them any help? Currently im using the prnadmin.dll from the windows server 2003 resource kit. Any help? Here is my current code: try { PrintMasterClass oPrinterMaster = new PrintMasterClass(); PortClass oPort =new PortClass(); oPrinterMaster.PortGet("",strPrinterPortName,oPort); oPrinterMaster.PortDel(oPort); System.Windows.Forms.MessageBox.Show(strPrinterPortName + " port deleted"); return true; } catch (Exception err) { System.Windows.Forms.MessageBox.Show(err.Message.ToString()); return false; }