Previous | Next |
The Rename method renames the associated object.
Syntax
HRESULT Rename(
LPWSTR pwszNewName,
IWMDMProgress* pProgress
);
Parameters
pwszNewName
[in] 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.
pwszNewName
[in] Pointer to an application-implemented IWMDMProgress interface that enables the application to receive progress notification for lengthy renaming operations.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
Return code | Description |
WMDM_E_BUSY | The media device is busy. |
E_INVALIDARG | The pwszNewName parameter is an invalid or NULL pointer. |
WMDM_E_INTERFACEDEAD | The file or folder was previously deleted. |
WMDM_E_NOTSUPPORTED | Renaming is not supported by this storage device. |
E_FAIL | An unspecified error occurred. |
See Also
Previous | Next |