Take a look at help topic http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Using_geoprocessing_to_develop_applications/0001000001wt000000/ and look at the section Geoprocessing Misstatements.
Misstatement—Geoprocessing tools only take datasets on disk as input and only write datasets to disks. Another way this has been stated is that geoprocessing is "pathname to pathname" only. Only pathnames to datasets can be used as input and output parameters.
In fact, you can use equivalent ArcObjects anywhere features classes are expected. For example, you can do the following:
Pass an object with IFeatureClass or IDataset as input to a tool instead of a pathname string.
Create in-memory feature classes, manipulate them, and use them in geoprocessing tools.
Use the special in-memory FeatureSet and RecordSet objects instead of feature classes and tables. These two objects behave like their on-disk counterparts.
Misstatement—Geoprocessing is not for processing individual features.
This is a corollary to the preceding misstatement. For example, suppose you have a single point geometry and you need to select nearby polygon features. You can insert this single point geometry into an empty IFeatureClass and use it as input to the Select Layer By Location tool, with a layer of the polygon features created by the Make Feature Layer tool. The output will be a new selection set on the layer that you can persist as a feature class (in-memory or on disk) using the Copy Features tool.
Edit
Here's one way I did this. I created an array of my selected features and created an in memory feature class with that array and used that feature class in the geoprocessor
pFCursor = pInFClass.Search(pQFilter, False)
pFeature = pFCursor.NextFeature
Counter = 0
Dim SubsetArray() As ESRI.ArcGIS.Geodatabase.IFeature
ReDim SubsetArray(pInFClass.FeatureCount(pQFilter) - 1)
Do Until pFeature Is Nothing
SubsetArray(Counter) = pFeature
Counter += 1
pFeature = pFCursor.NextFeature
Loop
pSelectedFClass = CreateInMemoryFeatures(SubsetArray, "SelectedFeatures", pInFClass)
'pInFClass is the original dataset that is a template for the in-memory feature class
'pSelectedFClass can be used in the geoprocessor
Public Function CreateInMemoryFeatures(ByVal FeatureArray() As ESRI.ArcGIS.Geodatabase.IFeature, ByVal Name As String, ByVal pFeatureClass As ESRI.ArcGIS.Geodatabase.IFeatureClass) As ESRI.ArcGIS.Geodatabase.IFeatureClass
Dim pFClass As ESRI.ArcGIS.Geodatabase.IFeatureClass
Dim pBuffer As ESRI.ArcGIS.Geodatabase.IFeatureBuffer
Dim pFCursor As ESRI.ArcGIS.Geodatabase.IFeatureCursor
Try
pFClass = CreateInMemoryFeatureClass(Name, pFeatureClass)
If pFClass Is Nothing Then Return Nothing
pBuffer = pFClass.CreateFeatureBuffer
pFCursor = pFClass.Insert(True)
For Each pFeature As ESRI.ArcGIS.Geodatabase.IFeature In FeatureArray
For i As Integer = 0 To pFeature.Fields.FieldCount - 1
If pBuffer.Fields.Field(i).Type <> ESRI.ArcGIS.Geodatabase.esriFieldType.esriFieldTypeOID Then pBuffer.Value(i) = pFeature.Value(i)
Next
pFCursor.InsertFeature(pBuffer)
Next
pFCursor.Flush()
Catch ex As Exception
System.Windows.Forms.MessageBox.Show(ex.ToString, "Create InMemory Feature error")
Finally
Release(pFCursor)
End Try
Return pFClass
End Function
Private Function CreateInMemoryFeatureClass(ByVal Name As String, ByVal pTemplateFClass As ESRI.ArcGIS.Geodatabase.IFeatureClass) As ESRI.ArcGIS.Geodatabase.IFeatureClass
Dim CreateFC As New ESRI.ArcGIS.DataManagementTools.CreateFeatureclass
Dim ShapeType As String
Dim dataset As ESRI.ArcGIS.Geodatabase.IDataset
Dim Result As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2
Dim Path As String
Try
Using releaser As New ESRI.ArcGIS.ADF.ComReleaser
releaser.ManageLifetime(CreateFC)
Select Case pTemplateFClass.ShapeType
Case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPoint
ShapeType = "Point"
Case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolyline
ShapeType = "Line"
Case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolygon
ShapeType = "Polygon"
Case Else
Return Nothing
End Select
dataset = pTemplateFClass
Path = dataset.Workspace.PathName & "\" & dataset.Name
If dataset.Workspace.WorkspaceFactory.WorkspaceType = ESRI.ArcGIS.Geodatabase.esriWorkspaceType.esriFileSystemWorkspace Then
If TypeOf dataset.Workspace.WorkspaceFactory Is ESRI.ArcGIS.DataSourcesFile.ShapefileWorkspaceFactory Then
Path = Path & ".shp"
End If
End If
If InStr(Path, "InMemory") <> 0 Then Path = Nothing
CreateFC.out_path = "in_memory"
CreateFC.out_name = Name
CreateFC.geometry_type = ShapeType
CreateFC.template = Path
CreateFC.spatial_reference = GetSpatialReferenceFromDataset(pTemplateFClass) 'this is an ArcGIS snippet
Result = RunTool(CreateFC, Nothing)
If Result Is Nothing Then
System.Windows.Forms.MessageBox.Show("Could not create InMemory dataset")
Return Nothing
End If
Return ReturnObjectfromResult(Result, "Feature Class")
End Using
Catch ex As Exception
System.Windows.Forms.MessageBox.Show(ex.ToString, "Create InMemory Featureclass error")
Return Nothing
End Try
End Function
Friend Function RunTool(ByVal Process As ESRI.ArcGIS.Geoprocessor.IGPProcess, ByVal TC As ESRI.ArcGIS.esriSystem.ITrackCancel2) As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2
Dim Result As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2
Dim GP As New ESRI.ArcGIS.Geoprocessor.Geoprocessor
Try
Result = CType(GP.Execute(Process, Nothing), ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2)
GP.ClearMessages()
Catch ex As Exception
System.Windows.Forms.MessageBox.Show(ex.ToString, "Run Geoprocessor")
End Try
Return Result
End Function
Friend Function ReturnObjectfromResult(ByVal result As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2, ByVal Type As String) As Object
Dim GPVal As ESRI.ArcGIS.Geodatabase.IGPValue
Dim InMemFC As String
Dim GPUtil As ESRI.ArcGIS.Geoprocessing.IGPUtilities3 = New ESRI.ArcGIS.Geoprocessing.GPUtilities
Try
GPVal = result.GetOutput(0)
InMemFC = GPVal.GetAsText()
Select Case Type
Case "Feature Class"
Return GPUtil.OpenFeatureClassFromString(InMemFC)
Case "Table"
Return GPUtil.OpenTableFromString(InMemFC)
End Select
Catch ex As Exception
System.Windows.Forms.MessageBox.Show(ex.ToString, "Return FeatureClass error")
Return Nothing
End Try
End Function