Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C++ Classes in FLL
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00811004
Message ID:
00811419
Views:
8
Pete,

I presume you mean how do you expose the functionality exposed in a C++ class using a C based FLL/DLL.

The biggest problem you face will be C++ name decoration. Decorated function names are created by the C++ compiler and used internally by the linker, this creates problems when you export the ordinal for use. The following compiler directive allows you to specify C style linkage.
extern "C" __declspec(dllexport) int SampleFunction(int parameter1);
This directive can also be used to export a classes functions in one go however a simpler approach is to use C++ objects inside standard C functions and then expose them through the VFP LCK.

As I am sure you will appreciate there are a lot of other routes you could explore, for example, a COM interface wrapper etc.

HTH
Neil
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform