Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Calling a function in a VFP dll from a C++ app
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement