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

Querying for Category 1 or 2 Schema Objects

· 52CE 我爱测

The systemFlags attribute of attributeSchema and classSchema objects is an integer bitmask that contains flags that indicate additional system qualities of the attribute or class.

The systemFlags attribute of attributeSchema and classSchema objects is an integer bitmask that contains flags that indicate additional system qualities of the attribute or class. The ADS_SYSTEMFLAG_ENUM enumeration contains values that correspond to the bits you can set in the systemFlags attribute. There are additional systemFlags bits that you cannot set, such as the 0x10 bit which indicates whether the attribute or class is category 1 or category 2. The 0x10 bit is set for category 1 objects, which are the classes and attributes included in the base schema included with the system. The bit is not set for category 2 attributes and classes, which are extensions to the schema. If no systemFlags property exists on an attributeSchema or classSchema object, it is category 2.

The LDAP_MATCHING_RULE_BIT_AND matching rule can be used to search for objects that have the 0x10 flag set in the systemFlags attribute. For more information, see Search Filter Syntax.

Querying for Category 1

The following query string searches for category 1 attributes (attributeSchema objects with the 0x10 bit set in the systemFlags property).

(&(objectCategory=attributeSchema)(systemFlags:1.2.840.113556.1.4.803:=16) )

Be aware that, in the example above, the LDAP query syntax requires decimal values; therefore, the hex value of the flag must be converted to decimal. In this case, category 1 bit is 0x10 so the filter value must be specified as 16.

Querying for Category 2

The following query string searches for category 2 attributes (attributeSchema objects that do not have the 0x10 bit set in the systemFlags property).

(&(objectCategory=attributeSchema)(!(systemFlags:1.2.840.113556.1.4.803:=16)))

Be aware that this query also returns attributeSchema objects that do not have a systemFlags property, and, therefore, implicitly do not have the specified flag set.

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)

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

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