Item(Index: Integer): IDomain;
Index. Domain index in collection.
The Item property returns a domain from the collection by its index.
The property is read-only.
To execute the example, make sure that the security manager contains the DOMAIN_USER domain user with the access to workstations method.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
Sec: IMetabaseSecurity;
User: IMetabaseUser;
St: IStations;
Dm: IDomains;
i: Integer;
Begin
MB := MetabaseClass.Active;
Sec := MB.Security;
// Get domain user parameters
User := Sec.ResolveName("DOMAIN_USER") As IMetabaseUser;
St := User.Stations;
Dm := St.Domains;
// Display the list of available domains to the console
For i := 0 To Dm.Count - 1 Do
Debug.WriteLine(Dm.Item(i).Name);
End For;
End Sub UserProc;
After executing the example, the console displays a list of domains, to which belong workstations in the DOMAIN_USER user collection.
See also: