Share via


IWMDMStorage2::GetStorage

banner art

The GetStorage method makes it possible to go directly to a storage from a storage name instead of enumerating through all storages.

Syntax

HRESULT GetStorage(
  LPWSTR  pszStorageName,
  IWMDMStorage**  ppStorage
);

Parameters

pszStorageName

[in]  Pointer to a null-terminated string containing the storage name.

ppStorage

[out]  Pointer to the storage object specified by pszStorageName, or NULL if no such storage was found.

Return Values

The method returns an HRESULT. All the interface methods in Windows Media Device Manager and service provider 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 a complete list of possible error codes, see Error Codes.

Possible values include, but are not limited to, those in the following table. If it fails with an error, it returns a standard error code.

Return code Description
S_OK The method succeeded.
S_FALSE The method failed.

Remarks

The IWMDMStorage2 interface extends the capabilities of IWMDMStorage.

IWMDMStorage2::GetStorage does not support wildcard characters. It is not recursive, that is, it will only find storages in the current storage.

Requirements

Header: Defined in wmdm.idl.

Library: mssachlp.lib

See Also