|
IStream::Clone
Creates a new stream object with its own seek pointer that references the same
bytes as the original stream.
HRESULT Clone(
IStream ** ppstm
| //Points to location for pointer to the new stream object
| );
|
|
Parameter
ppstm
[out]Points to location for the pointer to the new stream object. If an error
occurs, this parameter is NULL.
Return Values
S_OK
The stream was successfully cloned.
STG_E_INSUFFICIENT_MEMORY
The stream was not cloned due to a lack of memory.
STG_E_INVALIDPOINTER
The ppStm pointer is not valid.
Comments
This method creates a new stream object for accessing the same bytes but using
a separate seek pointer. The new stream object sees the same data as the
source stream object. Changes written to one object are immediately visible in the
other. Range locking is shared between the stream objects.
The initial setting of the seek pointer in the cloned stream instance is the
same as the current setting of the seek pointer in the original stream at the
time of the clone operation.
See Also
IStream::CopyTo
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|