IADsOU 屬性方法

IADsOU介面的屬性方法會取得或設定下表所列的屬性。 如需詳細資訊,請參閱 介面屬性方法

屬性

BusinessCategory

字串,包含組織單位所執行的一般商務功能或函式,例如「會計」。

存取類型:讀取/寫入

腳本資料類型: BSTR

// C++ method syntax
HRESULT get_BusinessCategory(
  [out] BSTR* pbstrBusinessCategory
);
HRESULT put_BusinessCategory(
  [in] BSTR bstrBusinessCategory
);

說明

包含組織單位文字描述的字串。

存取類型:讀取/寫入

腳本資料類型: BSTR

// C++ method syntax
HRESULT get_Description(
  [out] BSTR* pbstrDescription
);
HRESULT put_Description(
  [in] BSTR bstrDescription
);

FaxNumber

包含組織單位之 facsimile 編號的字串。

存取類型:讀取/寫入

腳本資料類型: BSTR

// C++ method syntax
HRESULT get_FaxNumber(
  [out] BSTR* pbstrFaxNumber
);
HRESULT put_FaxNumber(
  [in] BSTR bstrFaxNumber
);

LocalityName

字串,包含組織單位的地理區功能變數名稱稱。

存取類型:讀取/寫入

腳本資料類型: BSTR

// C++ method syntax
HRESULT get_LocalityName(
  [out] BSTR* pbstrLocalityName
);
HRESULT put_LocalityName(
  [in] BSTR bstrLocalityName
);

PostalAddress

字串,包含組織單位的郵遞區號。

存取類型:讀取/寫入

腳本資料類型: BSTR

// C++ method syntax
HRESULT get_PostalAddress(
  [out] BSTR* pbstrPostalAddress
);
HRESULT put_PostalAddress(
  [in] BSTR bstrPostalAddress
);

SeeAlso

字串陣列,其中包含可能與這個物件相關的其他目錄物件的辨別名稱。

存取類型:讀取/寫入

腳本資料類型: VARIANT

// C++ method syntax
HRESULT get_SeeAlso(
  [out] VARIANT* pvSeeAlso
);
HRESULT put_SeeAlso(
  [in] VARIANT vSeeAlso
);

TelephoneNumber

包含組織單位電話號碼的字串。

存取類型:讀取/寫入

腳本資料類型: BSTR

// C++ method syntax
HRESULT get_TelephoneNumber(
  [out] BSTR* pbstrTelephoneNumber
);
HRESULT put_TelephoneNumber(
  [in] BSTR bstrTelephoneNumber
);

範例

下列程式碼範例會顯示容器中所有組織單位的 BusinessCategoryDescription 。 它假設基礎目錄服務支援依組織單位分組目錄物件。

Dim dom As IADsContainer
Dim ou As IADsOU

' Bind to the container.
Set dom = GetObject("LDAP://server1/domain1")

' Filter out all objects that are not of class "organizationalUnit".
dom.filter = Array("organizationalUnit")

' Enumerate the organizational units in the container and display  
' the BusinessCategory and Description properties of each OU.
For Each ou In dom
    MsgBox ou.BusinessCategory & ": " & ou.Description
Next

規格需求

需求
最低支援的用戶端
Windows Vista
最低支援的伺服器
Windows Server 2008
標頭
Iads.h
DLL
Activeds.dll
IID
IID_IADsOU定義為 A2F733B8-EFFE-11CF-8ABC-00C04FD8D503

另請參閱

IADsOU

Interface 屬性方法