Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C++ Classes in FLL
Message
De
18/07/2003 05:14:05
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00811004
Message ID:
00811419
Vues:
9
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform