home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 27 / IOPROG_27.ISO / SOFT / ADSDK.ZIP / Samples / Start / Schema / vb / Schema.bas next >
Encoding:
BASIC Source File  |  1999-01-19  |  686 b   |  29 lines

  1. Attribute VB_Name = "Module1"
  2. Sub Main()
  3.  
  4.    'Bind to a schema container
  5.    Set Scm = GetObject("WinNT://INDEPENDENCE/Schema")
  6.    
  7.    'Show all items in the schema container
  8.    For Each obj In Scm
  9.       Debug.Print obj.Name & " (" & obj.Class & ")"
  10.    Next
  11.    
  12.    'You can also bind to an object and get the schema location
  13.    Set dom = GetObject("WinNT://INDEPENDENCE")
  14.    Debug.Print dom.Schema
  15.    Set Class = GetObject(dom.Schema)
  16.    'Mandatory attributes
  17.    For Each prop In Class.MandatoryProperties
  18.       Debug.Print prop
  19.    Next
  20.    
  21.    'Optional attributes
  22.    For Each prop In Class.OptionalProperties
  23.       Debug.Print prop
  24.    Next
  25.    
  26.     
  27.  
  28. End Sub
  29.