Ok, I\'ll rewrite the question(s). 1. Is it enough to do
class __declspec(dllexport) CXyz {
public:
int Food() {printf(\"Food\\n\");}
};
So th
Not enough. On the client side CXyz must be declared as __declspec(dllimport). This is usually done by conditional compilation, when some macro is expanded to __declspec(dllexport) in Dll, and to __declspec(dllimport) in a client project. Create sample Dll using VS Application Wizard, check "Export symbols" on one of the Wizard steps, and see, how it is done. And of course, client project should be linked with server .lib file, and server Dll should be available at runtime.
Only class members (and possibly vtable) are allocated. Class methods on Assembly level are global functions with hidden "this" parameter.