By dll, I assume you mean a COM server created in VFP.
>If I add a method to a DLL to open a table and
>return a value, the table is closed automatically
>when I come back out of the DLL, even though the
>DLL was instantiated in the same datasession.
>
VFP COM servers are specifically designed not to share a datasession with the calling program. If you create server whose only function is to open a table, you will not be able to access that table from the calling program.
Why would you want to do this? If you need a class that opens a table and makes it accessible to VFP, why make it a COM server at all? Other clients wouldn't know what to do with a VFP table even if hey could see it, so what's the point? What you are trying to do should be accomplished with a plain jane VFP object, not a COM object.
Erik Moore
Clientelligence