Marshal.copy allows for signed data types only, but I have a giant array of uint16 to pass to IPP code. Any i开发者_如何学Godeas ?
unsafe for looping on it seems wrong ...
You can use the good old mem copy API from kernel32 and declare the parameter types to fit your needs.
[DllImport("kernel32.dll", EntryPoint="RtlMoveMemory")]
static extern void CopyMemory(IntPtr dest, UInt16[] src, int length);
精彩评论