Microsoft SDK for Java

CopyTo

This method of the IStorage interface copies the entire contents of an open storage object to another storage object.

Syntax

public void CopyTo(_Guid[] rgiidExclude, String[] snbExclude, IStorage pstgDest);

Return Value

S_OK -- The storage object was successfully copied.

E_PENDING -- Asynchronous storage only: Part or all of the data to be copied is currently unavailable.

STG_E_ACCESSDENIED -- The destination storage object is a child of the source storage object.

STG_E_INSUFFICIENTMEMORY -- The copy was not completed due to a lack of memory.

STG_E_INVALIDPOINTER -- The pointer specified for the storage object was invalid.

STG_E_INVALIDPARAMETER -- One of the parameters was invalid.

STG_E_TOOMANYOPENFILES -- The copy was not completed because there are too many open files.

STG_E_REVERTED -- The storage object has been invalidated by a revert operation above it in the transaction tree.

STG_E_MEDIUMFULL

The copy was not completed because the storage medium is full.

Parameters

[in] rgiidExclude An array of interface identifiers that either the caller knows about and does not want to be copied or that the storage object does not support but whose state the caller will later explicitly copy. The array can include IStorage, indicating that only stream objects are to be copied, and IStream, indicating that only storage objects are to be copied. An array length of zero indicates that only the state exposed by the IStorage object is to be copied; all other interfaces on the object are to be ignored. Passing NULL indicates that all interfaces on the object are to be copied.
snbExclude [in] A string name block that specifies a block of storage or stream objects that are not to be copied to the destination. These elements are not created at the destination. If IID_IStorage is in the rgiidExclude array, this parameter is ignored. This parameter may be NULL.
pstgDest [in] Points to the open storage object into which this storage object is to be copied. The destination storage object can be a different implementation of the IStorage interface from the source storage object. Thus, CopyTo can only use publicly available methods of the destination storage object. If pstgDest is open in transacted mode, it can be reverted by calling its Revert method.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.