IWMDMStorage4::FindStorage method (mswmdm.h)
The FindStorage method retrieves a storage in the current root storage, based on its persistent unique identifier.
Syntax
HRESULT FindStorage(
[in] WMDM_FIND_SCOPE findScope,
[in] LPCWSTR pwszUniqueID,
[out] IWMDMStorage **ppStorage
);
Parameters
[in] findScope
A WMDM_FIND_SCOPE enumeration specifying the scope to search.
[in] pwszUniqueID
Persistent unique identifier of the storage to be found. The persistent unique identifier of the storage is described by the g_wszWMDMPersistentUniqueID metadata property of the storage.
[out] ppStorage
Pointer to the retrieved storage, if found. The caller must release this interface when done with it.
Return value
The method returns an HRESULT. All the interface methods in Windows Media Device Manager can return any of the following classes of error codes:
- Standard COM error codes
- Windows error codes converted to HRESULT values
- Windows Media Device Manager error codes
Remarks
This method only searches a single memory object (flash card or hard disc) on the device.
A persistent unique identifier identifies content stored on a particular device. It does not represent a content-specific globally unique identifier that remains identical across all devices. Thus, the same content stored in different storages will have different persistent unique identifiers. Similarly, different content may have the same persistent unique identifier when stored on different devices.
The format of the persistent unique identifier depends on the device. The application must have obtained the persistent unique identifier previously by obtaining a storage and querying it for its WMDM/PersistentUniqueID property. Use the GetSpecifiedMetadata or GetMetadata methods to request this property.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | mswmdm.h |
Library | Mssachlp.lib |