Stephen,
There's two examples of how to create a VC++ API style and calling it from VFP over on my website. They are under samples, SpyIn and DeQuote.
Rick Strahl has an example of creating a VC++ COM DLL over at West-Wind.com
>I need to move some compute intensive algorithms out of VFP and into a C++ object which is to be a DLL. VFP will do the data retrieval and this process also runs as an automation server.
>
>I am seeking suggestions on;
>1. How best to set this construct up.
>2. What pitfalls to expect.
>3. How well this implementation even is or if there is some better way.
>
>My current thinking is where the existing VFP server is populating VFP properties for calculations, to swap that out to populate the C++ object properties. Methods in the C++ object will perform the calculations and set final answer properties where the VFP server can extract them and continue processing.