Smart猫小萌
请注意,dowski和Panos引用的文章(MSDN Win32_Printer)可能会引起误解。我指的是大多数数组的第一个值。有些以1开头,有些以0开头。例如,“ ExtendedPrinterStatus ”表中的第一个值是1,因此,您的数组应该是这样的:string[] arrExtendedPrinterStatus = { "","Other", "Unknown", "Idle", "Printing", "Warming Up", "Stopped Printing", "Offline", "Paused", "Error", "Busy", "Not Available", "Waiting", "Processing", "Initialization", "Power Save", "Pending Deletion", "I/O Active", "Manual Feed"};另一方面,“ ErrorState ”表中的第一个值是0,因此,您的数组应如下所示:string[] arrErrorState = { "Unknown", "Other", "No Error", "Low Paper", "No Paper", "Low Toner", "No Toner", "Door Open", "Jammed", "Offline", "Service Requested", "Output Bin Full"};顺便说一句,“ PrinterState ”已过时,但是您可以使用“ PrinterStatus ”。