In the Object Browser of Visual Studio, when you go to
IntPtr(long)
, then you see the following under
Exceptions
Object Browser
System.OverflowException: On a 32-bit platform, value is too large or too small to represent as an System.IntPtr.
I guess you are running your application on a 32-bit platform, so you get this error.