网站首页  词典首页

请输入您要查询的函数:

 

术语 setntmsobjectattribute
释义 SetNtmsObjectAttribute
语法:
C++
DWORD SetNtmsObjectAttribute(
__in HANDLE hSession,
__in LPNTMS_GUID lpObjectId,
__in DWORD dwType,
__in LPCTSTR lpAttributeName,
__in LPVOID lpAttributeData,
__in DWORD dwAttributeSize
);
SetNtmsObjectAttribute功能
[移动存储管理不再作为Windows 7和Windows服务器2008 R2提供。]
该SetNtmsObjectAttribute函数创建一个扩展的属性(名为指定罗申对象的私有数据)。
参数
hSession [in]
处理由OpenNtmsSession函数返回的会议。
lpObjectId [in]
丹参的GUID对象的扩展属性被创建。
dwType [in]
丹参对象类型。 NtmsObjectsTypes对于对象类型的列表,请参阅。
lpAttributeName [in]
扩展的属性名称要创建的。
lpAttributeData [in]
用户定义的数据。
dwAttributeSize [in]
的大小lpAttributeData缓冲区,以字节为单位。
返回值
这个函数返回下列值之一。
ValueMeaning
ERROR_ACCESS_DENIEDNTMS_MODIFY_ACCESS被剥夺的对象或任何修改为指定的对象类型所允许的(见备注)。其他安全错误也是可能的,但它们都将意味着安全子系统的错误。
Windows XP/2000操作系统:没有访问权限是必需的。
ERROR_DATABASE_FAILUREThe数据库更新失败。
ERROR_INVALID_HANDLEThe价值hSession参数指定为NULL或无效。
ERROR_INVALID_NAMEThe名称或属性无效。在NTMS_MAXATTR_NAMELEN值定义属性名称的最大长度。该长度包括一个NULL。
ERROR_INVALID_PARAMETERThe指针为NULL或无效。
ERROR_NO_DATAThe属性指定大于或等于NTMS_MAXATTR_LENGTH。
ERROR_NOT_CONNECTEDUnable连接到RSM服务。
ERROR_OBJECT_NOT_FOUNDThe GUID是无效的。
ERROR_SUCCESSThe功能是成功的。
备注
该SetNtmsObjectAttribute函数必须在指定的执行丹参服务器。由于缓冲区的字节之间的封送不同的架构系统,远程执行此功能可能会导致不可预知的结果。
要删除一个属性,执行的属性设置一个长度为零。
以下是需要的对象的特殊访问权限的列表。
ObjectAccess
NTMS_CHANGERRequires NTMS_MODIFY_ACCESS库。
NTMS_CHANGER_TYPERequires NTMS_MODIFY_ACCESS到计算机。
NTMS_COMPUTERRequires NTMS_MODIFY_ACCESS到计算机。
NTMS_DRIVERequires NTMS_MODIFY_ACCESS库。
NTMS_DRIVE_TYPERequires NTMS_MODIFY_ACCESS到计算机。
NTMS_IEDOORRequires NTMS_MODIFY_ACCESS库。
NTMS_IEPORTRequires NTMS_MODIFY_ACCESS库。
NTMS_LIBRARYRequires NTMS_MODIFY_ACCESS库。
NTMS_LIBREQUESTRequires NTMS_MODIFY_ACCESS库。
NTMS_LOGICAL_MEDIARequires NTMS_MODIFY_ACCESS的逻辑媒体的媒体池。
NTMS_MEDIA_POOLRequires NTMS_MODIFY_ACCESS媒体池。
NTMS_MEDIA_TYPERequires NTMS_MODIFY_ACCESS到计算机。
NTMS_OPREQUESTRequires NTMS_MODIFY_ACCESS到计算机。
NTMS_PARTITIONRequires NTMS_MODIFY_ACCESS向一侧媒体池。
NTMS_PHYSICAL_MEDIARequires NTMS_MODIFY_ACCESS媒体池。
NTMS_STORAGESLOTRequires NTMS_MODIFY_ACCESS库。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
客户端 支持 Windows Vista
服务器 支持 Windows Server 2008
HeaderNtmsapi.h
LibraryNtmsapi.lib
DLLNtmsapi.dll
Unicode和ANSI namesSetNtmsObjectAttributeW(Unicode)和SetNtmsObjectAttributeA(ANSI)的
参见
对象管理职能
EnumerateNtmsObject
GetNtmsObjectAttribute
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==SetNtmsObjectAttribute Function
[ Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The SetNtmsObjectAttribute function creates an extended attribute (named private data) in the specified RSM object.
Syntax
C++
DWORD SetNtmsObjectAttribute(
__in HANDLE hSession,
__in LPNTMS_GUID lpObjectId,
__in DWORD dwType,
__in LPCTSTR lpAttributeName,
__in LPVOID lpAttributeData,
__in DWORD dwAttributeSize
);
Parameters
hSession [in]
Handle to the session returned by the OpenNtmsSession function.
lpObjectId [in]
GUID of the RSM object for which the extended attribute is to be created.
dwType [in]
RSM object type. For a list of object types, see NtmsObjectsTypes .
lpAttributeName [in]
Name of the extended attribute to be created.
lpAttributeData [in]
User-defined data.
dwAttributeSize [in]
Size of the lpAttributeData buffer, in bytes.
Return Value
This function returns one of the following values.
ValueMeaning
ERROR_ACCESS_DENIEDNTMS_MODIFY_ACCESS is denied to the object or no modifications are allowed for the specified object type (see Remarks). Other security errors are also possible, but they would indicate a security subsystem error.
Windows XP/2000: No access rights are required.
ERROR_DATABASE_FAILUREThe database update failed.
ERROR_INVALID_HANDLEThe value specified in the hSession parameter is NULL or is not valid.
ERROR_INVALID_NAMEThe name or attribute is not valid. The NTMS_MAXATTR_NAMELEN value defines the maximum attribute name length. The length includes a NULL.
ERROR_INVALID_PARAMETERThe pointer is NULL or is not valid.
ERROR_NO_DATAThe attribute specified is greater than or equal to NTMS_MAXATTR_LENGTH.
ERROR_NOT_CONNECTEDUnable to connect to the RSM service.
ERROR_OBJECT_NOT_FOUNDThe GUID is not valid.
ERROR_SUCCESSThe function was successful.

Remarks
The SetNtmsObjectAttribute function must be executed on the specified RSM server. Because the buffer of bytes is unmarshaled between systems of different architectures, remote execution of this function can result in unpredictable results.
To delete an attribute, perform a set of the attribute with a length of zero.
The following is the list of objects that require special access rights.
ObjectAccess
NTMS_CHANGERRequires NTMS_MODIFY_ACCESS to the library.
NTMS_CHANGER_TYPERequires NTMS_MODIFY_ACCESS to the computer.
NTMS_COMPUTERRequires NTMS_MODIFY_ACCESS to the computer.
NTMS_DRIVERequires NTMS_MODIFY_ACCESS to the library.
NTMS_DRIVE_TYPERequires NTMS_MODIFY_ACCESS to the computer.
NTMS_IEDOORRequires NTMS_MODIFY_ACCESS to the library.
NTMS_IEPORTRequires NTMS_MODIFY_ACCESS to the library.
NTMS_LIBRARYRequires NTMS_MODIFY_ACCESS to the library.
NTMS_LIBREQUESTRequires NTMS_MODIFY_ACCESS to the library.
NTMS_LOGICAL_MEDIARequires NTMS_MODIFY_ACCESS to the media pool of the logical media.
NTMS_MEDIA_POOLRequires NTMS_MODIFY_ACCESS to the media pool.
NTMS_MEDIA_TYPERequires NTMS_MODIFY_ACCESS to the computer.
NTMS_OPREQUESTRequires NTMS_MODIFY_ACCESS to the computer.
NTMS_PARTITIONRequires NTMS_MODIFY_ACCESS to the media pool of the side.
NTMS_PHYSICAL_MEDIARequires NTMS_MODIFY_ACCESS to the media pool.
NTMS_STORAGESLOTRequires NTMS_MODIFY_ACCESS to the library.

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
Unicode and ANSI namesSetNtmsObjectAttributeW (Unicode) and SetNtmsObjectAttributeA (ANSI)
See Also
Object Management Functions
EnumerateNtmsObject
GetNtmsObjectAttribute
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/bb540743(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 更新时间:2025/1/9 4:31:57