http://topic.csdn.net/u/20090831/08/9a829009-e118-4e87-9395-b1b1c180ba3a.html
我在上面这个链接找到bmwsl 的回答,能满足我的要求。
但是里面OpenPrinter(),GetPrinter(),ClosePrinter()函数,PRINTER_INFO_2类,, 都提示不存在。 没有引用。
是否应该要引用什么dll?
我在上面这个链接找到bmwsl 的回答,能满足我的要求。
但是里面OpenPrinter(),GetPrinter(),ClosePrinter()函数,PRINTER_INFO_2类,, 都提示不存在。 没有引用。
是否应该要引用什么dll?
// "theServer" must be a print server to which the user has full print access.
PrintServer myPrintServer = new PrintServer(@"\\theServer");// List the print server's queues
PrintQueueCollection myPrintQueues = myPrintServer.GetPrintQueues();
String printQueueNames = "My Print Queues:\n\n";
foreach (PrintQueue pq in myPrintQueues)
{
printQueueNames += "\t" + pq.Name + "\n";
}
Console.WriteLine(printQueueNames);
Console.WriteLine("\nPress Return to continue.");
Console.ReadLine();
Namespace: System.Printing
Assembly: System.Printing (in System.Printing.dll)
请问你说的API函数是什么意识?
System.Drawing.Printing;