map.extents returns an object instead of IExtent
As reported by Charlie Heaps (http://www.sei-us.org/)
The AxMap.Extents (http://www.mapwindow.org/documentation/mapwingis4.9/group__map__extents.html#ga3c2dbda8b40414767867ffc2c0bcaa75) returns an object, but other classes return IExtent, like
Providing a more consistent interface, the property type for Map.Extents has been changed from IDispatch* to IExtents*. Since IExtents is a dual interface, this change provides the well-known data type already provided by similar properties (MaxExtents and GeographicExtents) while still providing the discoverable (late-bound) interface provided by IDispatch, which is beneficial for scripting languages, such as VBA.
Casting solves this issue:
Most likely this is a remnant from the old days when MapWinGIS did not yet have IExtent.