This is a wierd one and at this point I am thinking that it may have something to do with my machines configuration.
Basically I have created a pretty standard imple
There are two different possible exceptions that get thrown from native code in this situation. Neither is caught by a try...catch block, no matter what you put (or don't put) in the catch.
One is "ArgumentOutOfRangeException crossed a native/managed boundary". To stop seeing this one, you need to uncheck "Break when exceptions cross AppDomain or managed/native boundaries (Managed only)" in Tools > Options > Debugging > General.
The other one is just "ArgumentOutOfRangeException". To stop seeing this one, you need to check "Enable Just My Code" in Tools > Options > Debugging > General.