You can via COM+ and do almost anything in VFP, however, you have security issues through Admin Tools, Component Services..
You can either build as a single-threaded or multi-threaded DLL.
Once registered, and the typelibrary info is "Add Referenced" to a C# (or other) app, you can make function calls with whatever parameters you need. There are many things you can return back, but typically tables, I send back as XML (via Foxpro's XMLAdapter class), then stream convert to a table once in C#. Its been a while since I worked it that way, but that give tremendous flexibility as you can do your queries, scan loops, and other complex conditional testing and updating of the cursor before generating out the XML and returning it as a string.
DEFINE CLASS YourClass as CUSTOM OLEPUBLIC
FUNCTION GetMyData( lcSomeString as String)
select * from (YourPath + "SomeTable" ) where ... into cursor C_SomeCursor readwrite
.. any other manipulation, testing, etc...
oXML = CREATEOBJECT( "xmladapter" )
lcXML = ""
oXML.AddTableSchema( "C_SomeCursor" )
oXML.ToXML( "lcXML", "", .f. )
return lcXML
ENDFUNC
ENDDEFINE