IMDSPObject::Rename method (mswmdm.h)

The Rename method renames the associated object which can be a file or a folder.

Syntax

HRESULT Rename(
  [in] LPWSTR        pwszNewName,
  [in] IWMDMProgress *pProgress
);

Parameters

[in] pwszNewName

Pointer to a wide-character null-terminated string to receive a new name for the object. For information on how to use the LPWSTR variable type, see the Windows documentation.

[in] pProgress

Pointer to an application-implemented IWMDMProgress interface that enables the application to receive progress notification for lengthy renaming operations.

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
For an extensive list of possible error codes, see Error Codes.

Remarks

This method is optional. For more information, see Mandatory and Optional Interfaces.

Requirements

Requirement Value
Target Platform Windows
Header mswmdm.h
Library Mssachlp.lib

See also

IMDSPObject Interface

IWMDMProgress Interface