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

Processing the Search Results

· 52CE 我爱测

After the first call to IDirectorySearch GetFirstRow or IDirectorySearch GetNextRow, either S_OK, S_ADS_NOMORE_ROWS, or an error result is returned.

After the first call to IDirectorySearch::GetFirstRow or IDirectorySearch::GetNextRow, either S_OK, S_ADS_NOMORE_ROWS, or an error result is returned.

If the return value is S_ADS_NOMORE_ROWS, no more objects matching the filter were found. If an error result is returned, the query failed. In both cases, you are not required to process the rows in the result because nothing was returned.

If S_OK is returned, a row has been retrieved. You can parse the columns by name using IDirectorySearch::GetColumn. The name is the lDAPDisplayName of the attribute in the column. The set of all columns was defined by the pAttributeNames parameter of the IDirectorySearch::ExecuteSearch method. If NULL was specified, the set of all columns is the union of all properties found for all the objects returned. To read the entire set of columns returned for an object, use the IDirectorySearch::GetNextColumnName to iterate each column, and use the column name returned to call IDirectorySearch::GetColumn.

The IDirectorySearch::GetColumn method returns an ADS_SEARCH_COLUMN structure that contains the attribute name, the type of the attribute, count of values, and a pointer to an array of ADSVALUE structures that contain the values. You can loop through the ADSVALUE structures to read the values for the property returned by the column. You must read the appropriate member of the ADSVALUE structure based on the ADSTYPE specified by the dwADsType member of the ADS_SEARCH_COLUMN structure (or the dwType member of the ADSVALUE structure). For example, if dwADsType was ADSTYPE_INTEGER, you would read the Integer member of each ADSVALUE structure.

For more information and a code example, see Example Code for Searching for Users.

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)

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

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