[DllImport("msvcrt.dll")]
private static extern unsafe int memcmp(byte* b1, byte* b2, int count);
public static unsafe int CompareBuffers(byte[] buffer1, int offset1, byte[] buffer2, int offset2, int count)
{
fixed (byte* b1 = buffer1, b2 = buffer2)
{
return memcmp(b1 + offset1, b2 + offset2, count);
}
}
.