Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

ManagementObjectSearcher: Requête sur ‘Win32_PrintJob’

Modifier,ou,créer,une,source,d'événement
{filelink=15686}

using System;
using System.Management;
 
public class ExemplePrintJob
{
    public static void Main()
	{
        string query = "SELECT * FROM Win32_PrintJob";
        using (ManagementObjectSearcher reqJob = new ManagementObjectSearcher(query))
		{
            using (ManagementObjectCollection jobs = reqJob.Get())
			{
                foreach (ManagementObject job in jobs)
				{
                    Console.WriteLine(job["JobID"]);
                }
            }
        }
    }
}

No comments yet.

Leave a Comment