AnsweredAssumed Answered

No such interface supported (Exception from HRESULT: 0x80004002

Question asked by shaningesri on Sep 25, 2013
Latest reply on Sep 26, 2013 by shaningesri
When I debugged the code:
            ESRI.ArcGIS.Location.RouteEventSource rteEventSource;
            rteEventSource = (ESRI.ArcGIS.Location.RouteEventSource)fClass;  // fClass - a feature class
            ESRI.ArcGIS.Location.IRouteEventSource rteEventSource2 = (ESRI.ArcGIS.Location.IRouteEventSource)rteEventSource;
I received the run-time error:
Unable to cast COM object of type 'System.__ComObject' to interface type 'ESRI.ArcGIS.Location.IRouteEventSource'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{641755F0-B7DE-11D3-9F7C-00C04F6BDF06}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
My CPU is in 64-bit, and I am using ArcGIS 10.1.  From this message, it appears to be that the QI fails for the interface - not supported.  From the ArcObjects diagram at http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//003100000138000000, the RouteEventSource class contains the IRouteEventSource interface.  However, in VS 2010 Object Browser, I can't see any IRouteEventSource member in the RouteEventSource class.  Does this observing mean that 'No such interface supported'?  If yes, how can this problem be fixed?  Thanks.

Outcomes