Platform SDK: Active Directory, ADSI, and Directory Services

IADsOU Property Methods

The property methods of the IADsOU interface get or set the properties described in the following table. For more information, see Interface Property Methods.

Properties in Vtable Order

Property Description
BusinessCategory

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

[C++]
HRESULT get_BusinessCategory
([out] BSTR *pbstrBusinessCategory);


HRESULT put_BusinessCategory
([in] BSTR bstrBusinessCategory);

A string indicating the general business function(s) performed by the organizational unit, for example "Accounting".
Description

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

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


HRESULT put_Description
([in] BSTR bstrDescription);

The text that describes the organization unit.
FaxNumber

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

[C++]
HRESULT get_FaxNumber
([out] BSTR *pbstrFaxNumber);


HRESULT put_FaxNumber
([in] BSTR bstrFaxNumber);

The fax number of the organization unit.
LocalityName

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

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


HRESULT put_LocalityName
([in] BSTR bstrLocalityName);

The name of the geographical region of the organization unit.
PostalAddress

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

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


HRESULT put_PostalAddress
([in] BSTR bstrPostalAddress);

The postal address of the organization unit.
TelephoneNumber

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

[C++]
HRESULT get_TelephoneNumber
([out] BSTR *pbstrTelephoneNumber);


HRESULT put_TelephoneNumber
([in] BSTR bstrTelephoneNumber);

The telephone number of the organization unit.
SeeAlso

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

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


HRESULT put_SeeAlso
([in] BSTR bstrSeeAlso);

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 description of a given organization unit. It assumes that the underlying directory service supports grouping of directory objects by organization unit.

Dim dom as IADsDomain
Dim ou as IADsOU
Set dom = GetObject("LDAP://server1/domain1")
dom.filter = Array("organizationalUnit")   
For each ou in dom
    MsgBox ou.BusinessCategory & ": " & ou.Description
Next

See Also

IADsOU, Interface Property Methods