Platform SDK: Active Directory, ADSI, and Directory Services

IADsLocality Property Methods

The methods of the IADsLocality interface read and write the properties described in this topic. For more information see Interface Property Methods.

Properties in Vtable Order

Property Description
Description

[Visual Basic]
Access: Read/Write
Data Type: BSTR

[C++]
HRESULT get_Description
([out] BSTR *pbstrDescription);


HRESULT put_Description
([in] BSTR bstrDescription);

Indicates the text that describes the locality.
LocalityName

[Visual Basic]
Access: Read/Write
Data Type: BSTR

[C++]
HRESULT get_LocalityName
([out] BSTR *pbstrLocalityName);


HRESULT put_LocalityName
([in] BSTR bstrLocalityName);

Indicates the name of the geographical region as represented by this locality object.
PostalAddress

[Visual Basic]
Access: Read/Write
Data Type: BSTR

[C++]
HRESULT get_PostalAddress
([out] BSTR *pbstrPostalAddress);


HRESULT put_PostalAddress
([in] BSTR bstrPostalAddress);

Indicates the main postal address of the locality.
SeeAlso

[Visual Basic]
Access: Read/Write
Data Type: BSTR

[C++]
HRESULT get_SeeAlso
([out] BSTR *pbstrSeeAlso);


HRESULT put_SeeAlso
([in] BSTR bstrSeeAlso);

Indicates an array of ADsPath names of other directory objects which may be relevant to this object.

Example Code [Visual Basic]

The following Visual Basic code snippet displays the locality information of a container object. It assumes that a locality object, named "myLocality", has been created for the container object and the properties have been set.

Dim dom as IADsContainer
Dim loc as IADsLocality
 
Set dom = getObject("LDAP://adsrv1/dc=Microsoft, dc=Com")
Set loc = dom.GetObject("locality","L=myLocality")
Debug.Print loc.Name
Debug.Print loc.LocalityName
Debug.Print loc.Description
Debug.Print loc.PostalAddress
Debug.Print loc.SeeAlso

See Also

IADs, IADsLocality, Interface Property Methods