IFileOperation::MoveItem method (shobjidl_core.h)
Declares a single item that is to be moved to a specified destination.
HRESULT MoveItem( [in] IShellItem *psiItem, [in] IShellItem *psiDestinationFolder, [in] LPCWSTR pszNewName, [in] IFileOperationProgressSink *pfopsItem );
Pointer to an IShellItem that specifies the source item.
Pointer to an IShellItem that specifies the destination folder to contain the moved item.
Pointer to a new name for the item in its new location. This is a null-terminated Unicode string and can be NULL. If NULL, the name of the destination item is the same as the source.
Pointer to an IFileOperationProgressSink object to be used for progress status and error notifications for this specific move operation. If you call IFileOperation::Advise for the overall operation, progress status and error notifications for the move operation are included there, so set this parameter to NULL.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
This method does not move the item, it merely declares the item to be moved. To move an object, you must make at least the sequence of calls detailed here:
- Call IFileOperation::MoveItem to declare the source item, destination folder, and destination name.
- Call IFileOperation::PerformOperations to begin the move operation.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|
|Header||shobjidl_core.h (include Shobjidl.h)|