Windows Media Format SDK banner art
PreviousNext

IWMDMStorageControl::Rename

The Rename method renames the content on a storage medium.

Syntax

HRESULT Rename(
  UINT  fuMode,
  LPWSTR  pwszNewName,
  IWMDMProgress*  pProgress
);

Parameters

  fuMode

[in]  Processing mode used for the Rename operation.

  pwszNewName

[in]  Pointer to a wide character NULL-terminated string containing the new name.

  pProgress

[in]  Specifies an IWMDMProgress interface that has been implemented by the application to track the progress of ongoing operations (optional; can be NULL).

Return Values

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Return code Description
WMDM_E_NOTSUPPORTED Renaming is not supported for this storage medium.
WMDM_E_INTERFACEDEAD The file or folder was previously deleted.
E_BUSY The media device is already busy with another operation.
E_INVALIDARG The pwszNewName parameter is invalid or NULL.
E_FAIL An unspecified error occurred.

Remarks

Upon successful renaming, the IWMDMStorage interface with which this instance of IWMDMStorageControl is associated reflects the changed name when the IWMDMStorage::GetName method is called.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.