0 out of 3 rated this helpful - Rate this topic

Marshal.Copy Method

Copies data from a managed array to an unmanaged memory pointer, or from an unmanaged memory pointer to a managed array.

Name Description
Marshal.Copy (Byte[], Int32, IntPtr, Int32) Copies data from a one-dimensional, managed 8-bit unsigned integer array to an unmanaged memory pointer.

Supported by the .NET Compact Framework.

Marshal.Copy (Char[], Int32, IntPtr, Int32) Copies data from a one-dimensional, managed character array to an unmanaged memory pointer.

Supported by the .NET Compact Framework.

Marshal.Copy (Double[], Int32, IntPtr, Int32) Copies data from a one-dimensional, managed double-precision floating-point number array to an unmanaged memory pointer.

Supported by the .NET Compact Framework.

Marshal.Copy (Int16[], Int32, IntPtr, Int32) Copies data from a one-dimensional, managed 16-bit signed integer array to an unmanaged memory pointer.

Supported by the .NET Compact Framework.

Marshal.Copy (Int32[], Int32, IntPtr, Int32) Copies data from a one-dimensional, managed 32-bit signed integer array to an unmanaged memory pointer.

Supported by the .NET Compact Framework.

Marshal.Copy (Int64[], Int32, IntPtr, Int32) Copies data from a one-dimensional, managed 64-bit signed integer array to an unmanaged memory pointer.

Supported by the .NET Compact Framework.

Marshal.Copy (IntPtr, Byte[], Int32, Int32) Copies data from an unmanaged memory pointer to a managed 8-bit unsigned integer array.

Supported by the .NET Compact Framework.

Marshal.Copy (IntPtr, Char[], Int32, Int32) Copies data from an unmanaged memory pointer to a managed character array.

Supported by the .NET Compact Framework.

Marshal.Copy (IntPtr, Double[], Int32, Int32) Copies data from an unmanaged memory pointer to a managed double-precision floating-point number array.

Supported by the .NET Compact Framework.

Marshal.Copy (IntPtr, Int16[], Int32, Int32) Copies data from an unmanaged memory pointer to a managed 16-bit signed integer array.

Supported by the .NET Compact Framework.

Marshal.Copy (IntPtr, Int32[], Int32, Int32) Copies data from an unmanaged memory pointer to a managed 32-bit signed integer array.

Supported by the .NET Compact Framework.

Marshal.Copy (IntPtr, Int64[], Int32, Int32) Copies data from an unmanaged memory pointer to a managed 64-bit signed integer array.

Supported by the .NET Compact Framework.

Marshal.Copy (IntPtr, IntPtr[], Int32, Int32) Copies data from an unmanaged memory pointer to a managed IntPtr array.
Marshal.Copy (IntPtr, Single[], Int32, Int32) Copies data from an unmanaged memory pointer to a managed single-precision floating-point number array.

Supported by the .NET Compact Framework.

Marshal.Copy (IntPtr[], Int32, IntPtr, Int32) Copies data from a one-dimensional, managed IntPtr array to an unmanaged memory pointer.
Marshal.Copy (Single[], Int32, IntPtr, Int32) Copies data from a one-dimensional, managed single-precision floating-point number array to an unmanaged memory pointer.

Supported by the .NET Compact Framework.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Memory corruption

Calling Marshall.Copy with a length of 0 can result in a memory corruption.