June 21,2008
memcpy (IntPtr to IntPtr) in C#
直接呼叫 msvcrt.dll 中的 memcpy 即可
[DllImport("msvcrt.dll")]
private static extern IntPtr memcpy(IntPtr dest, IntPtr src, long size);
追加一個,不想要裝 msvcrt 的,可以改 call kernel32.dll 裡的 RelMoveMemory
[DllImport("Kernel32.dll", EntryPoint = "RtlMoveMemory")]
private static extern void CopyMemory(IntPtr Destination, IntPtr Source, int Length);
引用URL
http://cgi.blog.roodo.com/trackback/6209493