大网数据广告活动
域与目录服务

IADsLocality Property Methods (Iads.h)

· 52CE 我爱测

The methods of the IADsLocality interface read and write the properties described in this topic. For more information, see Interface 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

Description

Indicates the text that describes the locality.

Access type: Read/write

Scripting data type: BSTR

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

LocalityName

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

Access type: Read/write

Scripting data type: BSTR

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

PostalAddress

Indicates the main postal address of the locality.

Access type: Read/write

Scripting data type: BSTR

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

SeeAlso

Indicates an array of ADsPath names of directory objects relevant to this object.

Access type: Read/write

Scripting data type: VARIANT

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

Examples

The following code example displays the locality data 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
On Error GoTo Cleanup
 
Set dom = getObject("LDAP://adsrv1/dc=Fabrikam, 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

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

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Header Iads.h
DLL Activeds.dll
IID IID_IADsLocality is defined as A05E03A2-EFFE-11CF-8ABC-00C04FD8D503

See also

IADs

IADsLocality

Interface Property Methods

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。