This method of the IStorage interface copies or moves a substorage or stream from this storage object to another storage object.
public void MoveElementTo(String pwcsName, IStorage pstgDest, String pwcsNewName, int grfFlags);
S_OK -- The storage object was successfully copied or moved.
E_PENDING -- Asynchronous storage only: Part or all the element's data is currently unavailable.
STG_E_ACCESSDENIED -- The destination storage object is a child of the source storage object.
STG_E_FILENOTFOUND -- The element with the specified name does not exist.
STG_E_FILEALREADYEXISTS -- The specified file already exists.
STG_E_INSUFFICIENTMEMORY -- The copy or move was not completed due to a lack of memory.
STG_E_INVALIDFLAG -- The value for the grfFlags parameter is not valid.
STG_E_INVALIDNAME -- Invalid value for pwcsName.
STG_E_INVALIDPOINTER -- The pointer specified for the storage object was invalid.
STG_E_INVALIDPARAMETER -- One of the parameters was invalid.
STG_E_REVERTED -- The storage object has been invalidated by a revert operation above it in the transaction tree.
STG_E_TOOMANYOPENFILES -- The copy or move was not completed because there are too many open files.
pwcsName | [in] Points to a wide character string that contains the name of the element in this storage object to be moved or copied. |
pstgDest | [in] IStorage pointer to the destination storage object. |
pwcsNewName | [in] Points to a wide character string that contains the new name for the element in its new storage object. |
grfFlags | [in] Specifies whether the operation should be a move (STGMOVE_MOVE) or a copy (STGMOVE_COPY). |