memcmp (msvcrt)
Last changed: -90.212.65.35

.
Summary
TODO - a short description

C# Signature:

[DllImport("msvcrt.dll", SetLastError=true)]
static extern int memcmp(IntPtr ptr1, IntPtr ptr2, int count);

C# Unsafe Signature:

[DllImport("msvcrt.dll", SetLastError=true)]
static extern unsafe int memcmp(void* ptr1, void* ptr2, int count);

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

//http://www.cplusplus.com/reference/clibrary/cstring/memcmp/
unsafe bool CompareByteArray(byte[] b1, byte[] b2)
{
     fixed (byte* p1 = b1)
     fixed (byte* p2 = b2)
     {
        return memcmp((void*)p1, (void*)p2, b1.Length) == 0;
     }
}

Documentation
memcmp on MSDN