Monitoring Print Spool Without Using Interop/Unmanaged Code

后端 未结 1 1293
醉梦人生
醉梦人生 2021-01-05 04:25

Background:

I\'m writing an application in C# using .NET 4.0. It prints a bunch of documents in a certain order. The documents are of all differen

相关标签:
1条回答
  • 2021-01-05 04:59

    Main Question: Take a look at the PrintQueue and LocalPrintServer class in the System.Printing namespace.

    Secondary Question: .NET was not written to be OS-independent (sans Mono), it was written to be Windows version independent. While it would be nice only deal with managed objects and managed calls, I see this as a somewhat unrealistic expectation. The sheer size and volume of existing C and COM functions exposed by Windows makes wrapping everything a daunting task. While i'm sure Microsoft has tons of developers on the payroll, I would say that the return on investment is quite low for such an undertaking, considering the relatively easy to use COM & P/Invoke support available.

    0 讨论(0)
提交回复
热议问题