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

Attribute Range Retrieval

· 52CE 我爱测

A multi-valued attribute can have almost any number of values. In many cases, it may be advantageous, or even necessary, to limit the range of values that are retrieved by a query.

A multi-valued attribute can have almost any number of values. In many cases, it may be advantageous, or even necessary, to limit the range of values that are retrieved by a query.

Range retrieval involves requesting a limited number of attribute values in a single query. The number of values requested must be less than, or equal to, the maximum number of values supported by the server. To reduce the number of times the query must contact the server, the number of values requested should be as close to this maximum as possible. To enable an application to work correctly with all Windows servers, a maximum number of 1000 should be used.

The range specifiers for a property query require the following form:

range=<low range>-<high range>

where "<low range>" is the zero-based index of the first property value to retrieve and "<high range>" is the zero-based index of the last property value to retrieve. Zero is used for "<low range>" to specify the first entry. The wildcard character (*) can be used for "<high range>" to specify all remaining entries.

The following table lists examples of range specifiers.

Example Description
range=0-* Retrieve all property values. This is subject to limits imposed by the server.
range=0-500 Retrieve from 1st to 501st values inclusively.
range=2-3 Retrieve 3rd and 4th values.
range=501-* Retrieve the 502nd and all remaining values. This is subject to limits imposed by the server.

There are several different ways to retrieve a range of property values. The IADs.GetInfoEx method can be used in either an automation language or C++. The IADs.GetInfoEx method is the preferred method of performing range retrieval. For more information about using IADs.GetInfoEx for range retrieval, see Using IADs::GetInfoEx for Range Retrieval.

If an automation language is used, the ActiveX Directory Objects (ADO) can be used to retrieve a range of property values. For more information about using ADO for range retrieval, see Using ADO for Range Retrieval.

If C++ is used, the IDirectorySearch and IDirectoryObject interfaces can be used to retrieve a range of property values. For more information about using IDirectorySearch and IDirectoryObject for range retrieval, see Using IDirectorySearch and IDirectoryObject for Range Retrieval. This type of retrieval should be done on queries with a scope type of Base (ADS_SCOPE_BASE).

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)

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

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