>does anyone know how to write a dll and invoke it in visual foxpro.
>Can you give an illustration of this.
Here is an example. Note that you probably won't want to write a COM component that works as shown, but it does walk through creating a DLL.
http://fox.wikis.com/wc.dll?wiki~COMComponentExample