网站首页  词典首页

请输入您要查询的函数:

 

术语 enumeratentmsobject
释义 EnumerateNtmsObject
语法:
C++
DWORD EnumerateNtmsObject(
__in HANDLE hSession,
__in LPNTMS_GUID lpContainerId,
__out LPNTMS_GUID lpList,
__inout LPDWORD lpdwListSize,
__in DWORD dwType,
__in DWORD dwOptions
);
EnumerateNtmsObject功能
[移动存储管理不再作为Windows 7和Windows服务器2008 R2提供。]
该EnumerateNtmsObject函数枚举罗申对象包含在lpContainerId参数。
参数
hSession [in]
处理由OpenNtmsSession函数返回的会议。
lpContainerId [in]
丹参对象的容器中的对象的唯一标识符,枚举。此参数可以是一个库的GUID,媒体池,分区ID,物理媒体,或逻辑媒体。枚举的却提示参数指定的类型的所有对象,无论容器,将该参数设置为NULL。如需有关对象的容器中关系的信息,请参阅NtmsObjectsTypes。
lpList [out]
缓冲区的库,驱动器,媒体或其他罗申对象ID数组。
lpdwListSize [ in , out ]
指针变量,指定ID的最大数量的函数可以返回通过lpList参数。在返回时,在lpList ID的数量返回lpdwListSize。
dwType [in]
对象类型来列举lpContainerId容器。如果lpContainerId为NULL,由丹参支持这一类型的所有对象列举。此参数可从NtmsObjectsTypes枚举类型为下列值之一。
ValueMeaning
NTMS_CHANGERChangers。
该lpContainerId参数必须为NULL或库的GUID。
NTMS_CHANGER_TYPEChanger类型。
该lpContainerId参数必须是NULL。
NTMS_COMPUTERCurrent计算机对象。
该lpContainerId参数必须是NULL。
NTMS_DRIVEDrives。
该lpContainerId参数必须为NULL或库的GUID。
NTMS_DRIVE_TYPEDrive类型。
该lpContainerId参数必须是NULL。
NTMS_IEDOORDoors。
该lpContainerId参数必须为NULL或库的GUID。
NTMS_IEPORTInsert /由lpContainerId参数或全部插入/由丹参支持弹出指定的端口库中包含弹出,如果一个NULL端口集装箱ID是供应。
该lpContainerId参数必须为NULL或库的GUID。
NTMS_LIBRARYLibrary对象。这些措施包括物理库单位和脱机库。
该lpContainerId参数必须是NULL。
NTMS_LIBREQUESTLibrary主动要求(或工作项目)排队的lpContainerId参数或所有库的工作范围内罗申排队项规定,如果库空容器ID是供应。
该lpContainerId参数必须为NULL或库的GUID。
NTMS_LOGICAL_MEDIALogical媒体对象。这是分配给应用程序可能包含不止一个侧面或物理媒体上中等。
该lpContainerId参数必须NUL,媒体池的GUID,或分区的GUID。
NTMS_MEDIA_POOLMedia池对象,它包含的逻辑和/或物理媒体和配置参数来管理它们。如果空容器作为指定ID,只有顶级的名字被返回。
该lpContainerId参数必须为NULL或媒体池的GUID。
NTMS_MEDIA_TYPEMedia类型的对象,其中包含的媒介,是由丹参支持类型的属性。使用NULL枚举将提供一切可能的媒体类型,而不仅仅是那些对当前服务器上可用。
该lpContainerId参数必须为NULL或库的GUID。
NTMS_OPREQUESTOperator要求在此罗申的服务器中。
该lpContainerId参数必须是NULL。
NTMS_PARTITIONSide在物理媒体上。在物理媒体上可以包含多个物理方面(例如,一个光盘包含两个方面)。
该lpContainerId参数必须为NULL,一个逻辑媒体的GUID,物理媒体的GUID,或者媒体池的GUID。
体育媒体NTMS_PHYSICAL_MEDIAItem(磁带,光盘,光盘,磁带或磁)。一个物理媒体上可以包含多个物理方面(例如,双方的光盘)。
该lpContainerId参数必须为NULL,一个媒体池GUID或库的GUID。
NTMS_STORAGESLOTMedia插槽载于lpContainerId或所有参数的存储插槽,支持由罗申指定的库,如果空容器ID是供应。
该lpContainerId参数必须为NULL或库的GUID。
dwOptions [in]
枚举选项。这是只适用时,却提示是NTMS_MEDIA_POOL。
ValueMeaning
NTMS_ENUM_ROOTPOOLThis列举了除所有其他顶级根池级媒体池,它始终是为列表中的第一个返回的GUID。枚举根池只需要获取或设置安全的对象属性。却提示必须NTMS_MEDIA_POOL和lpContainerId必须为NULL。
NTMS_ENUM_DEFAULTDoes不包括根池枚举枚举媒体时池。
Windows XP/2000操作系统:此参数是保留的,必须设置为零。
返回值
这个函数返回下列值之一。
ValueMeaning
ERROR_INVALID_PARAMETERThe lpdwListSize指针丢失,或者lpContainerId不是由却提示指定的对象类型的有效容器。
ERROR_INSUFFICIENT_BUFFERThe缓冲区大小lpdwListSize指定太所有对象的小发现。截断的函数列表,然后返回lpdwListSize实际大小。
ERROR_INVALID_HANDLEThe会话句柄丢失或无效。
ERROR_NOT_ENOUGH_MEMORYAn分配在处理过程中出现故障。
ERROR_OBJECT_NOT_FOUNDThe由lpContainerId指定的GUID不是数据库中的任何容器对象的GUID。
ERROR_SUCCESSThe功能是成功的。如果lpContainerId包含的却提示指定类型的任何对象,函数返回ERROR_SUCCESS和零lpdwListSize。
备注
安全功能也可以获取和设置丹参对象的特定访问权限。
如果在lpdwListSize参数中指定ID的数目大于当前缓冲区的大小,lpdwListSize返回所需的身份证号码。然后应用程序分配一个更大的缓冲区,然后再试一次。
因为它是可能的ID由另一个进程增加了随后的功能,很可能与大小列表获得一个错误,指出该名单是太小。
如果lpContainerId参数设置为NULL,罗申列举顶级(如库)级对象。
如果一个以上的对象是上市,该对象可能被枚举从多个集装箱。在空容器是最高级别的容器,并列举系统中的所有对象。例如,您可以列举在一个特定的库或系统中的所有媒体。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
客户端 支持 Windows Vista
服务器 支持 Windows Server 2008
HeaderNtmsapi.h
LibraryNtmsapi.lib
DLLNtmsapi.dll
参见
对象管理职能
CreateNtmsMediaPool
GetNtmsObjectInformation
SetNtmsObjectInformation
GetNtmsObjectSecurity
SetNtmsObjectSecurity
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==EnumerateNtmsObject Function
[ Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The EnumerateNtmsObject function enumerates the RSM objects contained in the lpContainerId parameter.
Syntax
C++
DWORD EnumerateNtmsObject(
__in HANDLE hSession,
__in LPNTMS_GUID lpContainerId,
__out LPNTMS_GUID lpList,
__inout LPDWORD lpdwListSize,
__in DWORD dwType,
__in DWORD dwOptions
);
Parameters
hSession [in]
Handle to the session returned by the OpenNtmsSession function.
lpContainerId [in]
Unique identifier of the RSM object container whose objects are to be enumerated. This parameter can be the GUID of a library, media pool, partition ID, physical media, or logical media. To enumerate all objects of the type specified by the dwType parameter, regardless of the container, set this parameter to NULL. For more information about the object-container relationship, see NtmsObjectsTypes .
lpList [out]
Buffer for the array of libraries, drives, media or other RSM object IDs.
lpdwListSize [in, out]
Pointer to a variable that specifies the maximum number of IDs the function can return through the lpList parameter. At return time, the number of IDs in lpList is returned in lpdwListSize.
dwType [in]
Type of objects to be enumerated in the lpContainerId container. If lpContainerId is NULL, all objects of this type supported by RSM are enumerated. This parameter can be one of the following values from the NtmsObjectsTypes enumeration type.
ValueMeaning
NTMS_CHANGERChangers.
The lpContainerId parameter must be NULL or a library GUID.
NTMS_CHANGER_TYPEChanger types.
The lpContainerId parameter must be NULL.
NTMS_COMPUTERCurrent computer object.
The lpContainerId parameter must be NULL.
NTMS_DRIVEDrives.
The lpContainerId parameter must be NULL or a library GUID.
NTMS_DRIVE_TYPEDrive types.
The lpContainerId parameter must be NULL.
NTMS_IEDOORDoors.
The lpContainerId parameter must be NULL or a library GUID.
NTMS_IEPORTInsert/eject ports contained in a library specified by the lpContainerId parameter or all the insert/eject ports supported by RSM if a NULL container ID is supplied.
The lpContainerId parameter must be NULL or a library GUID.
NTMS_LIBRARYLibrary objects. These include the physical library units and the offline library.
The lpContainerId parameter must be NULL.
NTMS_LIBREQUESTLibrary active requests (or work items) queued to the library specified by the lpContainerId parameter or all the library work items queued within RSM if a NULL container ID is supplied.
The lpContainerId parameter must be NULL or a library GUID.
NTMS_LOGICAL_MEDIALogical media object. This is a medium allocated to an application that might contain more than one side or piece of physical media.
The lpContainerId parameter must be NUL, a media pool GUID, or a partition GUID.
NTMS_MEDIA_POOLMedia pool object that contains logical and/or physical media, and configuration parameters to manage them. If NULL is specified as a container ID, only the top-level names are returned.
The lpContainerId parameter must be NULL or a media pool GUID.
NTMS_MEDIA_TYPEMedia type object that contains the attributes of a type of medium that is supported by RSM. Enumerating with a NULL will give all possible media types, not just those available on the current server.
The lpContainerId parameter must be NULL or a library GUID.
NTMS_OPREQUESTOperator requests that are on this RSM server.
The lpContainerId parameter must be NULL.
NTMS_PARTITIONSide on a piece of physical media. The piece of physical media can contain multiple physical sides (for example, an optical disk contains two sides).
The lpContainerId parameter must be NULL, a logical media GUID, a physical media GUID, or a media pool GUID.
NTMS_PHYSICAL_MEDIAItem of physical media (a tape, optical disk, CD-ROM, or magnetic cartridge). A piece of physical media can contain multiple physical sides (for example, sides of an optical disk).
The lpContainerId parameter must be NULL, a media pool GUID, or a library GUID.
NTMS_STORAGESLOTMedia slots contained in a library specified by the lpContainerId parameter or all the storage slots supported by RSM if a NULL container ID is supplied.
The lpContainerId parameter must be NULL or a library GUID.

dwOptions [in]
Enumeration options. This is applicable only when dwType is NTMS_MEDIA_POOL.
ValueMeaning
NTMS_ENUM_ROOTPOOLThis enumerates the root pool in addition to all other top-level media pools; it is always returned as the first GUID in the list. Enumerating the root pool is only required to get or set the security attributes on the object. dwType must be NTMS_MEDIA_POOL and lpContainerId must be NULL.
NTMS_ENUM_DEFAULTDoes not include enumeration of the root pool when enumerating the media pools.

Windows XP/2000: This parameter is reserved and must be set to zero.
Return Value
This function returns one of the following values.
ValueMeaning
ERROR_INVALID_PARAMETERThe lpdwListSize pointer is missing, or lpContainerId is not a valid container for the object type specified by dwType.
ERROR_INSUFFICIENT_BUFFERThe buffer size specified by lpdwListSize is too small for all the objects found. The function truncates the list and returns the actual size in lpdwListSize.
ERROR_INVALID_HANDLEThe session handle is missing or is not valid.
ERROR_NOT_ENOUGH_MEMORYAn allocation failure occurred during processing.
ERROR_OBJECT_NOT_FOUNDThe GUID specified by lpContainerId is not the GUID of any container object in the database.
ERROR_SUCCESSThe function was successful. If lpContainerId contains no objects of the type specified by dwType, the function returns ERROR_SUCCESS and a lpdwListSize of zero.

Remarks
Security functions are also available to get and set specific access rights on RSM objects.
If the available number of IDs specified in the lpdwListSize parameter is greater than the current buffer size, lpdwListSize returns the number of IDs required. The application should then allocate a larger buffer and try again.
Since it is possible for IDs to be added by another process, it is possible for a subsequent function with a resized list to get an error indicating that the list is too small.
If the lpContainerId parameter is set to NULL, RSM enumerates top-level objects (such as libraries).
If more than one object is listed, the object may be enumerated from more than one container. The NULL container is the highest-level container and enumerates all objects in a system. For example, you can enumerate media in a particular library or all media in the system.
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
CreateNtmsMediaPool
GetNtmsObjectInformation
SetNtmsObjectInformation
GetNtmsObjectSecurity
SetNtmsObjectSecurity
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/bb525507(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 13:20:35