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.


Property Description

[Visual Basic]
Access: Read/Write
DataType: BSTR

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".

[Visual Basic]
Access: Read/Write
DataType: BSTR

HRESULT get_Description
([out] BSTR* pbstrDescription);
HRESULT put_Description
([in] BSTR bstrDescription);

The text that describes the organizational unit.

[Visual Basic]
Access: Read/Write
DataType: BSTR

HRESULT get_FaxNumber
([out] BSTR* pbstrFaxNumber);
HRESULT put_FaxNumber
([in] BSTR bstrFaxNumber);

The fax number of the organizational unit.

[Visual Basic]
Access: Read/Write
DataType: BSTR

HRESULT get_LocalityName
([out] BSTR* pbstrLocalityName);
HRESULT put_LocalityName
([in] BSTR bstrLocalityName);

The name of the geographic region of the organizational unit.

[Visual Basic]
Access: Read/Write
DataType: BSTR

HRESULT get_PostalAddress
([out] BSTR* pbstrPostalAddress);
HRESULT put_PostalAddress
([in] BSTR bstrPostalAddress);

The postal address of the organizational unit.

[Visual Basic]
Access: Read/Write
DataType: BSTR

HRESULT get_TelephoneNumber
([out] BSTR* pbstrTelephoneNumber);
HRESULT put_TelephoneNumber
([in] BSTR bstrTelephoneNumber);

The telephone number of the organizational unit.

[Visual Basic]
Access: Read/Write
DataType: Variant

HRESULT get_SeeAlso
([out] VARIANT* pvSeeAlso);
HRESULT put_SeeAlso
([in] VARIANT vSeeAlso);

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

Example Code [Visual Basic]

The following code example 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

	If(Err.Number<>0) Then
		MsgBox("An error has occurred. " & Err.Number)
	End If
	Set dom = Nothing
	Set ou = Nothing


Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Iads.h.

See Also

IADsOU, Interface Property Methods