sagar shinde

sagar shinde

  • NA
  • 17
  • 12.7k

Win32 error: The printer name is invalid

Apr 9 2014 6:38 AM
Hi i am getting this exception when i am trying to create printserver object. Here is my code
PrintServer printServer = new PrintServer(@"\\" + printServerName);
PrintQueue printQueue = printServer.GetPrintQueue(printerName);
 
I trying to get the printers from another machine which is windows server 2012, same code works fine if i try to acess some OS based system. Any help will be appreciated. Thanks in advance

Answers (3)