Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a function in a VFP dll from a C++ app
Message
De
26/04/2006 17:04:47
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Calling a function in a VFP dll from a C++ app
Divers
Thread ID:
01116859
Message ID:
01116859
Vues:
62
Hello,

I have followed various examples to create a VFP dll and attempt to call it from Visual C++. The dll gets loaded but I do not get a pointer to the function. The VFP code in the dll looks like this:

DEFINE CLASS getReport as SESSION OLEPUBLIC
FUNCTION getData ()
.
.
.

The relevant C++ code is (assuming the dll gets loaded - I do get a real pointer returned from the LoadLibrary):

typedef BOOL (CALLBACK* getDataType)(LPCTSTR);
getDataType getDataPtr = NULL;
getDataPtr = (getDataType)GetProcAddressd(dllHandle,"getData");

The getDataPtr is always null. Do I need the class and function name (getReport.getData)? Doesn't seem to help...

Thanks,
Pat
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform