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

  1. Attribute VB_Name = "Module1"
  2. Sub Main()
  3. Set usr = GetObject("WinNT://INDEPENDENCE/Administrator,user")
  4.  
  5. '---- Reading a single value attribute
  6. Debug.Print usr.Name
  7. Debug.Print usr.FullName
  8.  
  9. 'Or you can also use generic Get
  10. Debug.Print usr.Get("FullName")
  11.  
  12. '---- Reading Multivalue attributes
  13. sid = usr.Get("objectSID")
  14. For Each sidByte In sid
  15.   Debug.Print Hex(sidByte)
  16. Next
  17.  
  18. 'Or you can also use LBound and UBound for multivalue attribute
  19. For i = LBound(sid) To UBound(sid)
  20.     Debug.Print Hex(sid(i))
  21. Next i
  22.  
  23.  
  24. End Sub
  25.