using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Management;
using System.Security;
using System.Printing;
using System.Net.Mail;
using System.Runtime.Remoting.Contexts;
using System.Net;
namespace ClassLibrary5
{
public class PrinterHelper
{
public static string GetPrinterStatusByName(string PrinterName)
{
int intValue = GetPrinterStatusInt(PrinterName);
string strRet = string.Empty;
switch (intValue)
{
case 0:
strRet = "准备就绪(Ready)";
break;
case 0x00000200:
strRet = "忙(Busy)";
break;
case 0x00400000:
strRet = "被打开(Printer Door Open)
版权声明:本文为yangjueye原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。