Hello all,
I am in big trouble. I have created a dll project with CB. This created a main.c, I changed that into a main.cpp, since I will need some classes also. The exported function thoug are extern C, so no name mangling. I wrote a litlle test project (console app from CB), which uses the dll (loaded thourh LoadLibrary, and then GetProcAddress) --> all woks well.
But when a project from M$ Developer Studio (mfc app and regular code, that regular uses the dll), thinsk go wrong. The exported functions seem to work well. One of those exported functions is a factory function which return a pointer to an class object created on the heap in the dll. When invoking member methods on that pointer, things go wrong. Crash !! I tried several methods (some with arguments, others without, I had one with no arguments -> error box is complaining about priviliged instruction).
What surprises me is that antoher mingw project can use the dll, while an M$ project can't.
Help help help help .....
Lieven