ITransferSource::MoveItem method (shobjidl_core.h)
Moves the item within the volume/namespace, returning the IShellItem in its new location.
Syntax
HRESULT MoveItem(
[in] IShellItem *psi,
[in] IShellItem *psiParentDst,
[in] LPCWSTR pszNameDst,
TRANSFER_SOURCE_FLAGS flags,
[out] IShellItem **ppsiNew
);
Parameters
[in] psi
Type: IShellItem*
A pointer to the IShellItem to be moved.
[in] psiParentDst
Type: IShellItem*
A pointer to the IShellItem that represents the new parent item at the destination.
[in] pszNameDst
Type: LPCWSTR
Pointer to a null-terminated buffer that contains the destination path.
flags
Type: TRANSFER_SOURCE_FLAGS
Flags that control the file operation. One or more of the TRANSFER_SOURCE_FLAGS constants.
[out] ppsiNew
Type: IShellItem**
When this method returns successfully, contains an address of a pointer to the IShellItem in its new location.
Return value
Type: HRESULT
Returns S_OK if the move succeeded. In that case, ppsiNew points to the address of the new item. Other possible return values, both success and failure codes, include the following:
Return code | Description |
---|---|
|
The destination item already exists and has not been overwritten. In this case, ppsiNew is NULL and the caller should delete the source item. |
|
The destination item already exists and the user has chosen to merge the source and destination folders. In this case, ppsiNew points to a NULL value and the caller should delete the source item. |
|
When the item being moved is a folder, the caller should convert a move operation into a copy and delete operation. |
|
The caller should convert a move operation into a copy and delete operation. This error is seen as HRESULT_FROM_WIN32(ERROR_NOT_SAME_DEVICE) .
|
|
When moving a folder, the caller should convert the move operation into a copy and delete operation. The destination item must support ITransferDestination. This error is seen as HRESULT_FROM_WIN32(ERROR_FILE_EXISTS) .
|
|
When moving a folder, the caller should convert the move operation into a copy and delete operation. The destination item must support ITransferDestination. This error is seen as HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS) .
|
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) |
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για