Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create DLL using visual C++ for visual foxpro
Message
 
 
To
08/09/1998 23:20:55
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00133927
Message ID:
00134772
Views:
12
Vlad,

I don't use the macros at all. Member functions of the class that are callable in the DLL are just simply:

defined in the H file:

class CSpyinApp : public CWinApp
{
public:
int FilterData( int nStringLen, int nCharsPerWord, LPSTR cStringData );
...}


coded in the .cpp file:

int CSpyinApp::FilterData(int nStringLen, int nCharsPerWord, LPSTR cStringData)
{...}


Then in the .def file I just list the entry points:

EXPORTS
; Explicit exports can go here
FilterData @1


>>>I have never needed do modify the .def file manually. I just declare the functions extern "C" and __declspec(dllexport). So, I can use the dll from C/C++ (statically or dynamically) and VFP. What am I missing here?
>>
>>Well, I've never gotten it to work without it. Also the DLL Wizards
>>create the DEF file by default, so...
>
>I know a .def file gets created by the wizards, but I never modify it directly. As I said, it's enough to declare the functions as I said. Unless there's something I'm missing and I never got hit by IT! :)
>
>>I think it may have to do with the WINAPI macro I use. WINAPI allows
>>for importing and exporting depending on how you use the lib file,
>>so maybe it needs the explicit pointers to the export functions.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform