有几个低级别函数用于设置和检索对象的 安全描述符。 每对仅适用于有限的一组 Windows 对象。 例如,一对处理文件对象,另一对适用于注册表项。 下表显示了要与不同类型的安全对象一起使用的低级别函数。
对象类型 | 低级别函数 |
---|---|
使用 GetFileSecurity 和 SetFileSecurity 函数。 这些函数使用字符串来标识安全对象,而不是使用句柄。 | |
使用 GetKernelObjectSecurity 和 SetKernelObjectSecurity 函数。 | |
使用 GetUserObjectSecurity 和 SetUserObjectSecurity 函数。 | |
使用 RegGetKeySecurity 和 RegSetKeySecurity 函数。 | |
使用 QueryServiceObjectSecurity 和 SetServiceObjectSecurity 函数。 | |
|
将 PRINTER_INFO_2 结构与 GetPrinter 和 SetPrinter 函数配合使用。 |
将级别 502 与 NetShareGetInfo 和 NetShareSetInfo 函数配合使用。 | |
使用 CreatePrivateObjectSecurity、DestroyPrivateObjectSecurity、GetPrivateObjectSecurity 和 SetPrivateObjectSecurity 函数。 |