[This is preliminary documentation and subject to change.]
The EnumerateNtmsObject function enumerates the RSM objects contained in the lpContainerId parameter.
DWORD WINAPI EnumerateNtmsObject(
HANDLE hSession,
LPNTMS_GUID lpContainerId,
LPNTMS_GUID lpList,
LPDWORD lpdwListSize,
DWORD dwType,
DWORD dwOptions
);
Value | Meaning |
---|---|
NTMS_CHANGER | Lists changers contained in the library specified by the lpContainerId parameter or all the changers supported by RSM if a NULL container ID is supplied. Available when lpContainerID is set to NULL or Library. |
NTMS_DRIVE | Lists drives contained in a specific library specified by the lpContainerId parameter or all the drives supported by RSM if a NULL container ID is supplied. Available when lpContainerID is set to NULL or Library. |
NTMS_CHANGER_TYPE | Lists changer types supported by RSM. The lpContainerId parameter must be NULL. |
NTMS_COMPUTER | Specifies the current computer object. The lpContainerId parameter must be NULL. |
NTMS_DRIVE_TYPE | Lists drive types supported by RSM. The lpContainerId parameter must be NULL. |
NTMS_IEDOOR | Lists access doors contained in a library specified by the lpContainerId parameter or all the doors supported by RSM if a NULL container ID is specified. Available when lpContainerID is set to NULL or Library. |
NTMS_IEPORT | Lists insert/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. Available when lpContainerID is set to NULL or Library. |
NTMS_LIBRARY | Lists the library objects. These include the physical library units and the offline library. The lpContainerId parameter must be NULL. |
NTMS_LIBREQUEST | Lists library 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. Available when lpContainerID is set to NULL or Library. |
NTMS_LOGICAL_MEDIA | Specifies a logical media object. This is a medium allocated to an application that might contain more than one partition or piece of physical media. Available when lpContainerID is set to NULL, Media Pool, or Partition ID. |
NTMS_MEDIA_POOL | Specifies a media 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. Available when lpContainerID is set to NULL or Media Pool. |
NTMS_MEDIA_TYPE | Specifies a media 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. Available when lpContainerID is set to NULL or Library. |
NTMS_OPREQUEST | Lists operator requests that are on this RSM server. The lpContainerId parameter must be NULL. |
NTMS_PARTITION | Specifies a partition on a piece of physical media. The piece of physical media can contain multiple physical partitions (for example, an optical disk contains two sides). Available when lpContainerID is set to NULL, Physical Media, Logical Media, or Media Pool. |
NTMS_PHYSICAL_MEDIA | Specifies a piece of physical media (a tape, optical disk, CD-ROM, or magnetic cartridge). A piece of physical media can contain multiple physical partitions (for example, sides of an optical disk). The container ID contains NULL to get all the physical media, a media pool, logical media, or a library. Available when lpContainerID is set to NULL, Media Pool, or Library |
NTMS_STORAGESLOT | Lists media 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. Available when lpContainerID is set to NULL or Library. |
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. To avoid this, specify a list in the lpdwListSize parameter that is slightly larger than the required length.
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.
Windows NT: Requires version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in ntmsapi.h.
Import Library: Use ntmsapi.lib.
Object Management Functions, CreateNtmsMediaPool, GetNtmsObjectInformation, SetNtmsObjectInformation