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.

41 lines
1.2 KiB

  1. VERSION 5.00
  2. Begin VB.Form Form1
  3. Caption = "Form1"
  4. ClientHeight = 3285
  5. ClientLeft = 60
  6. ClientTop = 345
  7. ClientWidth = 10695
  8. LinkTopic = "Form1"
  9. ScaleHeight = 3285
  10. ScaleWidth = 10695
  11. StartUpPosition = 3 'Windows Default
  12. Begin VB.ListBox List
  13. Height = 2010
  14. ItemData = "execnquery.frx":0000
  15. Left = 240
  16. List = "execnquery.frx":0002
  17. TabIndex = 0
  18. Top = 600
  19. Width = 10095
  20. End
  21. End
  22. Attribute VB_Name = "Form1"
  23. Attribute VB_GlobalNameSpace = False
  24. Attribute VB_Creatable = False
  25. Attribute VB_PredeclaredId = True
  26. Attribute VB_Exposed = False
  27. Private Sub Form_Load()
  28. ' The following sample registers to be informed whenever an instance
  29. ' of the class MyClass is created
  30. Dim objServices As ISWbemServices
  31. Dim objEnum As ISEnumWbemObject
  32. Dim objEvent As ISWbemObject
  33. Set objServices = GetObject("cim:root/default")
  34. Set objEnum = objServices.ExecNotificationQuery("select * from __instancecreationevent where targetinstance isa 'MyClass'")
  35. For Each objEvent In objEnum
  36. List.AddItem "Got an event"
  37. Next
  38. End Sub