Query Win32_PrintJob causes spoolsv.exe to grow and brings down system?

Discussion in 'Windows XP WMI' started by F. C., Apr 14, 2006.

  1. F. C.

    F. C. Guest

    Is this causing spoolsv.exe to grow in memory? Any workaround?
    ==================
    SELECT * FROM __InstanceCreationEvent WITHIN 1 WHERE TargetInstance ISA
    'Win32_PrintJob'
    ==================


    Finally narrow down to this -

    Why the follwing few lines of codes cause spoolsv.exe keep growing / eating
    memory? It checks Win32_PrintJob once every second and I guess that has
    something to do with spoolsv.exe. It keeps growing and eventually bring
    down
    my systems (WinServer 2003 and XP home in my case)

    How can I stop it from growing? Any best practice sample codes of doing
    this?

    Thanks

    ==========
    Imports System
    Imports System.Management
    .......

    Dim watcherPrintJob As ManagementEventWatcher
    Dim scope As New ManagementScope("root\CIMV2")
    Dim qryPrintJob As New WqlEventQuery("SELECT * FROM
    __InstanceCreationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_PrintJob'")
    watcherPrintJob = New ManagementEventWatcher(scope, qryPrintJob)
    watcherPrintJob.Start()
    scope = Nothing
    qryPrintJob = Nothing
    watcherPrintJob.Dispose()
    ===================
     
    F. C., Apr 14, 2006
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. F. C.
    Replies:
    0
    Views:
    766
    F. C.
    Apr 15, 2006
  2. Guest
    Replies:
    4
    Views:
    1,014
    batman
    Apr 6, 2008
  3. gianni
    Replies:
    10
    Views:
    1,982
    Guest
    Nov 18, 2007
  4. the dude

    USB Devices causes Reboot

    the dude, Dec 21, 2007, in forum: Windows XP WMI
    Replies:
    0
    Views:
    414
    the dude
    Dec 21, 2007
  5. Nikko
    Replies:
    0
    Views:
    2,191
    Nikko
    May 15, 2008
Loading...

Share This Page