Accord.SystemTools.CopyUnmanagedMemory C# (CSharp) Method

CopyUnmanagedMemory() public static method

Copy block of unmanaged memory.

This function is required because of the fact that .NET does not provide any way to copy unmanaged blocks, but provides only methods to copy from unmanaged memory to managed memory and vise versa.

public static CopyUnmanagedMemory ( IntPtr dst, IntPtr src, int count ) : IntPtr
dst System.IntPtr Destination pointer.
src System.IntPtr Source pointer.
count int Memory block's length to copy.
return System.IntPtr
        public static IntPtr CopyUnmanagedMemory(IntPtr dst, IntPtr src, int count)
        {
            unsafe
            {
                CopyUnmanagedMemory((byte*)dst.ToPointer(), (byte*)src.ToPointer(), count);
            }
            return dst;
        }

Same methods

SystemTools::CopyUnmanagedMemory ( byte dst, byte src, int count ) : byte*