Novell is now a part of Micro Focus

Alias Objects: Find the "Aliased Object Name" with Novell's ActiveX Controls

Articles and Tips: tip

Wolfgang Schreiber
Manager Developer Support
Novell, Inc.

01 Nov 2001

The problem with reading Alias objects through Novell's ActiveX controls is that the controls automatically de-reference the Alias objects. This means that only information about the object referenced by the alias, rather than alias object, is returned.

Assume that you have an Alias object called "Chef" that refers to a real user object (the Aliased Object) "Admin."

If you read an Alias object (e.g., Chef) into an NWEntry variable, all subsequent operations will work on the Aliased Object (Admin). Also, properties like NWEntry.Layout.Name will return the layout of the Aliased object ("User"), instead of returning the layout name "Alias."

You cannot even read the only (mandatory) attribute of an Alias object, the field "Aliased Object Name," because every read attempt is run against the referenced object (e.g., user Admin) that does not have such attribute. You can only read the properties of the Aliased Object.

This makes it rather difficult to determine, what the name and location of that Aliased Object is (e.g., in which the Admin user object resides).

If you have an NWDir entry X, that contains the Alias object Chef, you can read the "Aliased Object Name" utilizing the NWDirQuery control - set the properties of NWDirQuery1 like this:

  • NWDirQuery1.Filter 'Alias(CN=" & X.ShortName & ")"

  • NWDirQuery1.FullNameX.Parent

  • NWDirQuery1.Fields "Aiased Object Name"

  • NWDirQuery1.SearchScope qrySearchSubordinates

  • NWDirQuery1.SearchMode qrySearchSynchronous

  • NWDirQuery1.MaximumResults 1

  • NWDirQuery1.SortKeys 'CN'

Then, after calling NWDirQuery1.Search, the query results will contain the alias object with the "Aliased Object Name" attribute.

* Originally published in Novell AppNotes


The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates