Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I've been working on a project in which I'm using WMI and WQL class instances in order to use two specific functions.

What I have tried:

I've been working on a project in which I'm using WMI and WQL class instances in order to use two specific functions. Firstly, when there is a print request ManagementEventWatcher listens a request then pauses specific Printer,
Second procedure is that after pausing I have to take number of pages to be printed using ManagementObjectSearcher and collection properties where both Management objects have unique access query is Win32_PrintJob.
The problem after pausing printer I couldn't get number of pages.
Note: I'm using these two specific functions as windows service, invoked them in OnStart method.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900