VisualStudioFeeds

All Visual Studio blogs in one place

AddThis Social Bookmark Button
Calling the Compare method will (sometimes) crash your entire application in a very rude fashion, why? static bool Compare(byte[] b1, byte[] b2) { IntPtr retval = memcmp(b1, b2, new IntPtr(b1.Length)); return retval == IntPtr.Zero; } [DllImport("msvcrt.dll")] static extern IntPtr memcmp(byte[] b1, byte[] b2, IntPtr count); In fact, there are actually two different problems that I can see here. The easy one would consistently crash, the hard one would usually pass, but sometime crash you in an apparently random ways.

Search

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Home : Blog List : Ayende @ Rahien : What is wrong with this code?