I am trying to share foxPro files with Clipper apps using CDX-compatible drivers. The problem is that the index expressions include function names that are incompatible with FoxPro. Some are easy to fix - the Pad() function can be replaced with PadL() for example. However, the Descend() function allows mixed ascend/descend indexes, such as INDEX ON CUSTCODE + DESCEND(INV_DATE) TO...

As you can guess, this will produce a sort order of ascending costmer codes, but descending invoice dates.

I know how to reproduce the functionality of Descend() in FoxPro by creating a UDF, but I also need to know how to make sure that it is always available every time VFP8 runs - without the user having to explicitly load any procedure files. What is the best practice for this? Also, is it possible to create a DLL or something containing UDF's for index expressions athat can be attached to an ODBC, OLE DB or ADO objects so that other apps using an instance of the FoxPro data engine can also automatically have access to these functions?

TIA

Carlo