General information
Category:
Windows API functions
Don't you prefer to have everything in just one place? (eg the export declaration in the same place as the function declaration)
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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only