Marshal Methods


.NET Framework Class Library
Marshal..::.Copy Method

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

Overload List

  NameDescription
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(array<Byte>[]()[], Int32, IntPtr, Int32)Copies data from a one-dimensional, managed 8-bit unsigned integer array to an unmanaged memory pointer.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(array<Char>[]()[], Int32, IntPtr, Int32)Copies data from a one-dimensional, managed character array to an unmanaged memory pointer.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(array<Double>[]()[], Int32, IntPtr, Int32)Copies data from a one-dimensional, managed double-precision floating-point number array to an unmanaged memory pointer.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(array<Int16>[]()[], Int32, IntPtr, Int32)Copies data from a one-dimensional, managed 16-bit signed integer array to an unmanaged memory pointer.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(array<Int32>[]()[], Int32, IntPtr, Int32)Copies data from a one-dimensional, managed 32-bit signed integer array to an unmanaged memory pointer.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(array<Int64>[]()[], Int32, IntPtr, Int32)Copies data from a one-dimensional, managed 64-bit signed integer array to an unmanaged memory pointer.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(IntPtr, array<Byte>[]()[], Int32, Int32)Copies data from an unmanaged memory pointer to a managed 8-bit unsigned integer array.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(IntPtr, array<Char>[]()[], Int32, Int32)Copies data from an unmanaged memory pointer to a managed character array.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(IntPtr, array<Double>[]()[], Int32, Int32)Copies data from an unmanaged memory pointer to a managed double-precision floating-point number array.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(IntPtr, array<Int16>[]()[], Int32, Int32)Copies data from an unmanaged memory pointer to a managed 16-bit signed integer array.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(IntPtr, array<Int32>[]()[], Int32, Int32)Copies data from an unmanaged memory pointer to a managed 32-bit signed integer array.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(IntPtr, array<Int64>[]()[], Int32, Int32)Copies data from an unmanaged memory pointer to a managed 64-bit signed integer array.
Public methodStatic memberCopy(IntPtr, array<IntPtr>[]()[], Int32, Int32)Copies data from an unmanaged memory pointer to a managed IntPtr array.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(IntPtr, array<Single>[]()[], Int32, Int32)Copies data from an unmanaged memory pointer to a managed single-precision floating-point number array.
Public methodStatic memberCopy(array<IntPtr>[]()[], Int32, IntPtr, Int32)Copies data from a one-dimensional, managed IntPtr array to an unmanaged memory pointer.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkCopy(array<Single>[]()[], Int32, IntPtr, Int32)Copies data from a one-dimensional, managed single-precision floating-point number array to an unmanaged memory pointer.
Top
See Also

Reference

Tags :


Community Content

3dmashup
Missing Functionality for unsigned ints
Marshall copy is great but hard to use for unsigned variables like Uint16, UInt32, Uint64 as there are no overloads that support the copy functionality for unsigned variables. There is no workaround as you can't cast a UInt16[] to an Int16[]. The Copy function should not care as long you are copying unsigned to unsigned and the element lengths are equal.

Page view tracker