无法在网络打印机上获取打印队列 [英] Unable to get the print queues on a net work printer
问题描述
当我尝试在网络打印机上获取打印队列时,出现以下错误. When I try to get the printqueue on a network printer I am getting follwoing error. PrintServer printSvr = PrintServer @" \\ DC-PRINTSVR \ HP3100&; );
PrintServer printSvr = new PrintServer(@"\\DC-PRINTSVR\HP3100");
PrintQueueCollection printQues = printSvr.GetPrintQueues(); 这篇关于无法在网络打印机上获取打印队列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
枚举PrintQueue对象时发生了异常. Win32错误:文件名,目录名称或卷标签语法不正确.
我尝试使用不同的网络打印机,但遇到相同的错误.
代码:
An exception occurred while enumerating PrintQueue objects. Win32 error: The filename, directory name, or volume label syntax is incorrect.
I have tried different network printers but getting the same error.
Code:
推荐答案
通常您需要在使用共享资源之前对远程计算机进行身份验证.这意味着您需要p-invoke Windows网络功能.
usually you need to authenticate the remote computer before using a shared resource. And that means you need p-invoke Windows Networking Functions.