Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

NullReference in PrintQueueCollection

$
0
0

Hi,

Exception:

System.Printing Object reference not set to an instance of an object. at MS.Internal.PrintWin32Thunk.EnumDataThunkObject.GetPrintSystemValuesPerPrintQueues(PrintServer printServer, EnumeratedPrintQueueTypes[] flags, Queue`1 printObjectsCollection, String[] propertyFilter) at System.Printing.PrintQueueCollection..ctor(PrintServer printServer, String[] propertyFilter, EnumeratedPrintQueueTypes[] enumerationFlag)

It occurs when invoking:

vat x = printServer.GetPrintQueues(new[] { EnumeratedPrintQueueTypes.Local, EnumeratedPrintQueueTypes.Connections });

Any ideas, what is the reason and how best to fix?


Viewing all articles
Browse latest Browse all 8156

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>