IMDSPStorage4::GetReferences
The GetReferences method returns an array of pointers to IMDSPStorage objects comprising the references contained in an association storage, such as one representing playlist or album objects.
Syntax
HRESULT GetReferences(DWORD*pdwRefs,IMDSPStorage***pppISPStorage);
Parameters
pdwRefs
[out] Pointer to the count of IWMDMStorage interface pointers being returned in pppIWMDMStorage.
pppISPStorage
[out] Pointer to a pointer to the array of IWMDMStorage interface pointers that represent references on a storage. Such references can, for example, represent items in a playlist or album. The ordering of references matches the ordering in this array. Memory for this array should be allocated by the service provider.
Return Values
The method returns an HRESULT. All of 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
For an extenstive list of possible error codes, see Error Codes.
Possible values include, but are not limited to, those in the following table. If the method fails with an error, it returns a standard error code.
Return code | Description |
S_OK | The method succeeded. |
S_FALSE | The method succeeded. However, one or more items referenced by the storage on the device side have been deleted since the last call to SetReferences. |
E_INVALIDARG | Either pointer pdwRefs or pppIWMDMStorage is NULL. |
E_OUTOFMEMORY | The method could not be completed due to insufficient memory. |
WMDM_E_INTERFACEDEAD | The storage represented by this IWMDMStorage4 interface has been deleted. |
Remarks
Windows Media Device Manager uses this method for obtaining the references on an association storage such as a playlist or an album.
If the storage has references to one or more items that have been deleted from the device, the SP should not include these references in the references returned. The SP should indicate such condition by returning S_FALSE. The application might choose to refresh the association storage object by using the known-good references returned here. The SP can also refresh the references itself.
If the count of references is 0, service provider must return an array of references with 0 elements in it.
Requirements
Header: Defined in mswmdm.h.
Library: mssachlp.lib
See Also