Nuta
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować się zalogować lub zmienić katalog.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
Changes the name of an item, returning the IShellItem with the new name.
Syntax
HRESULT RenameItem(
[in] IShellItem *psiSource,
[in] LPCWSTR pszNewName,
[in] TRANSFER_SOURCE_FLAGS flags,
[out] IShellItem **ppsiNewDest
);
Parameters
[in] psiSource
Type: IShellItem*
A pointer to the IShellItem object to be renamed.
[in] pszNewName
Type: LPCWSTR
A pointer to a null-terminated, Unicode string containing the new name.
[in] flags
Type: TRANSFER_SOURCE_FLAGS
Flags that control the file operation. One or more of the TRANSFER_SOURCE_FLAGS constants.
[out] ppsiNewDest
Type: IShellItem**
When this method returns, contains the address of a pointer to the IShellItem object.
Return value
Type: HRESULT
Returns one of the following, or an error code.
| Return code | Description |
|---|---|
|
User responded "Yes" to the dialog. |
|
User responded to retry the current action. |
|
User responded "No" to the dialog. |
|
User responded to merge folders. |
|
User responded to retry the file with new name. |
|
Child items should not be processed. |
|
Error has been queued and will display later. |
|
User canceled the current action. |
|
Operation requires elevated privileges. |
Requirements
| 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) |