网站首页  词典首页

请输入您要查询的函数:

 

术语 setntmsobjectsecurity
释义 SetNtmsObjectSecurity
语法:
C++
DWORD SetNtmsObjectSecurity(
__in HANDLE hSession,
__in LPNTMS_GUID lpObjectId,
__in DWORD dwType,
__in SECURITY_INFORMATION lpSecurityInformation,
__in PSECURITY_DESCRIPTOR lpSecurityDescriptor
);
SetNtmsObjectSecurity功能
[移动存储管理不再作为Windows 7和Windows服务器2008 R2提供。]
该SetNtmsObjectSecurity函数写入指定的罗申对象的安全描述符。
参数
hSession [in]
处理由OpenNtmsSession函数返回的会议。
lpObjectId [in]
唯一标识符丹参对象。
dwType [in]
丹参对象类型。对于对象类型的列表,请参阅NtmsObjectsTypes。
lpSecurityInformation [in]
阿SECURITY_INFORMATION值,指定安全信息写入罗申对象。
lpSecurityDescriptor [in]
指针SECURITY_DESCRIPTOR结构,它指定了安全描述符写入罗申对象:NTMS_USE_ACCESS,NTMS_CONTROL_ACCESS,或NTMS_MODIFY_ACCESS。
返回值
这个函数返回下列值之一。
ValueMeaning
ERROR_ACCESS_DENIEDThe特权需要修改安全描述符被拒绝。
ERROR_DATABASE_FAILUREThe数据库无法访问或已损坏。
ERROR_DATABASE_FULLThe数据库已满。
ERROR_INVALID_HANDLEThe会话句柄丢失或无效。
ERROR_INVALID_PARAMETERThe对象ID丢失。
ERROR_NO_SECURITY_ON_OBJECTThere没有此对象的安全信息。
ERROR_OBJECT_NOT_FOUNDThe对象ID是无效的。
ERROR_SUCCESSThe功能是成功的。
备注
如果应用程序使用SetNtmsObjectSecurity设置自由访问控制列表的对象(ACL)中,应用程序必须具有WRITE_DAC许可或对象的所有者。
如果应用程序使用SetNtmsObjectSecurity来设置一个对象的系统ACL的SE_SECURITY_NAME特权必须为应用程序启用。有关详细信息,请参阅SetPrivateObjectSecurity功能。如需安全有关罗申信息,请参见丹参安全。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
客户端 支持 Windows Vista
服务器 支持 Windows Server 2008
HeaderNtmsapi.h
LibraryNtmsapi.lib
DLLNtmsapi.dll
参见
对象管理职能
EnumerateNtmsObject
GetNtmsObjectSecurity
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==SetNtmsObjectSecurity Function
[ Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The SetNtmsObjectSecurity function writes the security descriptor for the specified RSM object.
Syntax
C++
DWORD SetNtmsObjectSecurity(
__in HANDLE hSession,
__in LPNTMS_GUID lpObjectId,
__in DWORD dwType,
__in SECURITY_INFORMATION lpSecurityInformation,
__in PSECURITY_DESCRIPTOR lpSecurityDescriptor
);
Parameters
hSession [in]
Handle to the session returned by the OpenNtmsSession function.
lpObjectId [in]
Unique identifier of the RSM object.
dwType [in]
RSM object type. For a list of object types, see the NtmsObjectsTypes .
lpSecurityInformation [in]
A SECURITY_INFORMATION value that specifies the security information to write to the RSM object.
lpSecurityDescriptor [in]
Pointer to a SECURITY_DESCRIPTOR structure that specifies the security descriptor to write to the RSM object: NTMS_USE_ACCESS, NTMS_CONTROL_ACCESS, or NTMS_MODIFY_ACCESS.
Return Value
This function returns one of the following values.
ValueMeaning
ERROR_ACCESS_DENIEDThe privileges required to modify the security descriptor are denied.
ERROR_DATABASE_FAILUREThe database is inaccessible or damaged.
ERROR_DATABASE_FULLThe database is full.
ERROR_INVALID_HANDLEThe session handle is missing or is not valid.
ERROR_INVALID_PARAMETERThe object ID is missing.
ERROR_NO_SECURITY_ON_OBJECTThere is no security information for this object.
ERROR_OBJECT_NOT_FOUNDThe object ID is not valid.
ERROR_SUCCESSThe function was successful.

Remarks
If an application uses SetNtmsObjectSecurity to set the discretionary access-control list (ACL) of an object, the application must have WRITE_DAC permission or be the owner of the object.
If an application uses SetNtmsObjectSecurity to set the system ACL of an object, the SE_SECURITY_NAME privilege must be enabled for the application. For more information, see the SetPrivateObjectSecurity function. For more information on RSM security, see RSM Security .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
End of client supportWindows Vista
End of server supportWindows Server 2008
HeaderNtmsapi.h
LibraryNtmsapi.lib
DLLNtmsapi.dll
See Also
Object Management Functions
EnumerateNtmsObject
GetNtmsObjectSecurity
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/bb540745(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:28:26