>How are you compiling this? C++ compilers perform name mangling
>which is incompatible with WinAPI calling conventions.
Not if the exported functions are declared in the def file. In this case, the names are exported in C style.
As David said a declaration like:
MyFunc @1
will export the MyFunc function in C style.
>I guess you can override the objects, but then question becomes
>why would you do this? It's an object and you can't really
>create it on your own. You'd have to load it in DLLMain and then
>leave it running the entire lifetime of the DLL.
Even if the object is created in DLLMain, the function will not work properly (although no error is raised) if it uses any member variables.
If the function doesn't access any member variable or is a static member function, than it works ok.
Vlad
Précédent
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