Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a function in a VFP dll from a C++ app
Message
From
26/04/2006 17:04:47
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Calling a function in a VFP dll from a C++ app
Miscellaneous
Thread ID:
01116859
Message ID:
01116859
Views:
60
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
Next
Reply
Map
View

Click here to load this message in the networking platform