Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Declares a single item that is to be given a new display name.
HRESULT RenameItem(
[in] IShellItem *psiItem,
[in] LPCWSTR pszNewName,
[in] IFileOperationProgressSink *pfopsItem
);
[in] psiItem
Type: IShellItem*
Pointer to an IShellItem that specifies the source item.
[in] pszNewName
Type: LPCWSTR
Pointer to the new display name of the item. This is a null-terminated, Unicode string.
[in] pfopsItem
Type: IFileOperationProgressSink*
Pointer to an IFileOperationProgressSink object to be used for status and failure notifications. If you call IFileOperation::Advise for the overall operation, progress status and error notifications for the rename operation are included there, so set this parameter to NULL.
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
This method does not rename the item, it merely declares the item to be renamed. To rename an object, you must make at least the sequence of calls detailed here:
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | shobjidl_core.h (include Shobjidl.h) |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today