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

Choosing an Interface for Binding

· 52CE 我爱测

When a directory object is bound to, the caller specifies the type of ADSI interface desired.

When a directory object is bound to, the caller specifies the type of ADSI interface desired. All ADSI directory objects support the IADs interface. An ADSI object can also support other interfaces. The actual interfaces supported by the object depends on the class of object. For example, a user object supports the IADsUser interface, but will not support the IADsComputer interface.

Automation clients should use the IADs* interfaces because these interfaces are dual-interfaces that provide a greater level of abstraction and provide data using the VARIANT data type.

In addition to the IADs* interfaces, C/C++ clients can use the IDirectoryObject and IDirectorySearch interfaces. These interfaces are not dual-interfaces and do not support automation. These interfaces do provide greater control over exactly which attributes to retrieve and allow access to the raw data stored in a property. For example, when the IADs::Get method is used to retrieve the ntSecurityDescriptor attribute for an object, the IADs::Get method provides an IDispatch interface pointer that supports the IADsSecurityDescriptor interface. The IADsSecurityDescriptor interface is provided by ADSI to represent a security descriptor. In comparison, when the IDirectoryObject::GetObjectAttributes method is used to retrieve the ntSecurityDescriptor attribute, IDirectoryObject::GetObjectAttributes provides an array of bytes that can be cast to a SECURITY_DESCRIPTOR structure. The Win32 security APIs can be used with this data to manipulate the security descriptor.

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)

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

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