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.

43 lines
1.3 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 = "item.frx":0000
  15. Left = 240
  16. List = "item.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 enumerates all instances of the class
  29. ' Win32_LogicalDisk, and extract the the member with a specified
  30. ' relative path.
  31. Dim objServices As ISWbemServices
  32. Dim objEnum As ISEnumWbemObject
  33. Dim objInstance As ISWbemObject
  34. Set objServices = GetObject("cim:root/cimv2")
  35. Set objEnum = objServices.ExecQuery("select * from Win32_LogicalDisk")
  36. ' Note that the Item method is the default method of this interface
  37. Set objInstance = objEnum("Win32_LogicalDisk=""C:""")
  38. List.AddItem (objInstance.Path_.DisplayName)
  39. End Sub