Returns a list of local users of the specified domain/library.
Visual Basic (declaration) |
---|
Public Function GetLocalUsers( _ |
C# (declaration) |
---|
public XmlNode GetLocalUsers( |
<response success="true" error="">
<users>
<user username="user1" .... >
....
</user>
<usergroups/>
</response>
<//xml>
Visual Basic Example |
---|
Public Sub GetLocalUsers_Sample() Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxxxx" Const IR_DomainName As String = "Public" Dim IR_Obj As InfoRouter.srv Dim xmlResponse As System.Xml.XmlElement Try IR_Obj = New InfoRouter.srv xmlResponse = IR_Obj.GetLocalUsers(IRAuthenticationTicket, _ IR_DomainName) If xmlResponse.GetAttribute("success") = "true" Then Console.WriteLine("-- " & IR_DomainName & " [Local Users] --") Dim xmlUsers As System.Xml.XmlElement = xmlResponse.FirstChild Dim xmlUser As System.Xml.XmlElement For Each xmlUser In xmlUsers.ChildNodes Console.WriteLine( _ xmlUser.GetAttribute("UserName") & vbTab & _ xmlUser.GetAttribute("FirstName") & vbTab & _ xmlUser.GetAttribute("LastName")) Next Console.WriteLine("-----------") xmlUsers = Nothing Else Console.WriteLine("The Local Users cannot be listed.") Console.WriteLine("server response:" & xmlResponse.GetAttribute("error")) End If xmlResponse = Nothing Catch ex As Exception Console.WriteLine("error:" & ex.Message) Finally IR_Obj = Nothing End Try End Sub |