IMDSPEnumStorage interface (mswmdm.h)

The IMDSPEnumStorage interface is used to enumerate the storage media on a device. For more information on the standard implementation of enumeration interfaces, see the Microsoft COM documentation, available at the Microsoft Web site. The storage media on a device are organized in a hierarchical manner similar to disk drives on a computer.

When accessed from the IMDSPDevice::EnumStorage method, this interface enumerates the individual storage media on the device in the same way that you would see the individual disk drives on a computer.

When accessed from the IWMDMStorage::EnumStorage method, this interface enumerates the contents of the storage medium. EnumStorage can be called on the enumerated storage objects recursively, and thus the contents of a storage medium are returned in the hierarchical fashion in which they are stored on the storage medium. If the file system of the storage medium supports a notion of order among the content, the enumerator will return the contents in the same order.

The storage enumerator returns a snapshot of the state of storages. It may not reflect the effect of storage media insertion and removal and may not reflect the effects of subsequent Insert, Move and Delete methods. The client should obtain a new enumerator to get the new state of the storage media.

The Insert, Move, and Delete methods of the IWMDMStorageControl interface change the order of files. If these operations are invoked, then the order of objects as originally returned by the IMDSPEnumStorage interface can be changed.

If an application is going to display the order of content on a media device, the application programmer must take into account order changes that can occur as a result of IWMDMStorageControl operations. There are two ways to deal with this situation. One way is to simply re-enumerate whenever a change to content occurs. Another way is to maintain the order of IWMDMStorage objects programmatically.

No matter how this issue is handled, it must be handled by the application if the order of files is important to the application.

Inheritance

The IMDSPEnumStorage interface inherits from the IUnknown interface. IMDSPEnumStorage also has these types of members:

Methods

The IMDSPEnumStorage interface has these methods.

 
IMDSPEnumStorage::Clone

The Clone method creates another enumerator that contains the same enumeration state as the current one. (IMDSPEnumStorage.Clone)
IMDSPEnumStorage::Next

The Next method returns a pointer to the next celtIMDSPStorage interfaces.
IMDSPEnumStorage::Reset

The Reset method resets the enumeration sequence to the beginning. A subsequent call to the Next method fetches the first storage interface in the enumeration sequence.
IMDSPEnumStorage::Skip

The Skip method skips over the next specified number of storage interface(s) in the enumeration sequence.

Requirements

Requirement Value
Target Platform Windows
Header mswmdm.h

See also

IMDSPDevice::EnumStorage

IMDSPStorage Interface

IWMDMStorage Interface

IWMDMStorage::EnumStorage

IWMDMStorageControl Interface

Interfaces for Service Providers