I think in general we have been pretty lax about checking / handling the case where an UIntPtr overflows an int (how often will this happen...) - but we could check that the value we are getting back can be handled by an int and throw an exception if it doesn't...