Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IStream.CopyTo Method

Copies a specified number of bytes from the current seek pointer in the stream to the current seek pointer in another stream.

Namespace:  System.Runtime.InteropServices.ComTypes
Assemblies:   mscorlib (in mscorlib.dll)
  System.Runtime.InteropServices (in System.Runtime.InteropServices.dll)

void CopyTo(
	IStream pstm,
	long cb,
	IntPtr pcbRead,
	IntPtr pcbWritten
)

Parameters

pstm
Type: System.Runtime.InteropServices.ComTypes.IStream

A reference to the destination stream.

cb
Type: System.Int64

The number of bytes to copy from the source stream.

pcbRead
Type: System.IntPtr

On successful return, contains the actual number of bytes read from the source.

pcbWritten
Type: System.IntPtr

On successful return, contains the actual number of bytes written to the destination.

For more information, see the existing documentation for IStream::CopyTo in the MSDN Library.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Portable Class Library

Supported in: Portable Class Library
Show:
© 2015 Microsoft