c# - Access Printer Status using Winspool -
hello i've used example on how access printer status using winspool. //code written mark middlemist - @delradie //made available @ http://delradiesdev.blogspot.com //interop details http://pinvoke.net/ using system; using system.runtime.interopservices; namespace delradiesdev.printerstatus { public class winspoolprinterinfo { [dllimport("winspool.drv", charset = charset.auto, setlasterror = true)] public static extern int openprinter(string pprintername, out intptr phprinter, ref printer_defaults pdefault); [dllimport("winspool.drv", setlasterror = true, charset = charset.auto)] public static extern bool getprinter(intptr hprinter, int32 dwlevel, intptr pprinter, int32 dwbuf, out int32 dwneeded); [dllimport("winspool.drv", setlasterror = true)] public static extern int closeprinter(intptr hprinter); [structlayout(layoutkind.sequential)] public struct printer_defaults { public intptr pdatatype; ...