Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
777 B

  1. '***********************************************************************
  2. '*
  3. '* WbemSink_OnCompleted
  4. '*
  5. '***********************************************************************
  6. sub WbemSink_OnCompleted(hResult, pErrorObject, pAsyncContext)
  7. end sub
  8. '***********************************************************************
  9. '*
  10. '* WbemSink_OnObjectReady
  11. '*
  12. '***********************************************************************
  13. sub WbemSink_OnObjectReady(pObject, pAsyncContext)
  14. end sub
  15. Dim Service
  16. Dim MyObect
  17. Set Service = GetObject ("Winmgmts:")
  18. Set MySink = Wscript.CreateObject ("Wbemscripting.SWbemSink", "WbemSink_")
  19. While True
  20. 'Set MyObject = Service.GetASync ("win32_Service")
  21. Service.GetAsync MySink, "win32_Service"
  22. Wend