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.

40 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 = "associatorsof.frx":0000
  15. Left = 240
  16. List = "associatorsof.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 retrieves all references to an instance of
  29. ' the class Win32_LogicalDisk.
  30. Dim objServices As ISWbemServices
  31. Dim objEnum As ISEnumWbemObject
  32. Set objServices = GetObject("cim://myServer/root/cimv2")
  33. Set objEnum = objServices.ReferencesTo("Win32_LogicalDisk=""C:""")
  34. Dim Instance As ISWbemObject
  35. For Each Instance In objEnum
  36. List.AddItem (Instance.Path_.DisplayName)
  37. Next
  38. End Sub