huangs3

IRouteLocatorOperations.LocatePointFeatures does not work for in-memory workspace?

Discussion created by huangs3 on Aug 7, 2012
Latest reply on Sep 16, 2013 by xtian79
Hi Everybody:

     I am using IRouteLocatorOperations.LocatePointFeatures method to locate a point along a route. For inputs, this method needs a workspace in the output dataset name, and some existing feature classes.
     If I use a local file geodatabase as workspace for the output dataset name, as well as the source of the input feature classes, then my code works properly. If I use the in-memory workspace instead, I could sucessfully create a temporary feature class there using IFeatureWorkspace.CreateFeatureClass method and generate some data with IFeatureClass.CreateFeature method. However, when I use IRouteLocatorOperations.LocatePointFeatures to take the output dataset name pointing to in-memory workspace and the temporary feature class in memory as inputs, my code returned an error message: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
     Is there any way I can fix it? or this is the limitation of IRouteLocatorOperations.LocatePointFeatures?
     Thank you!

Outcomes