Thursday, July 7, 2011

Can I write overloaded function inside my DLL?

You cant do it.....GetProcAddress expects C linkage...no name decoration...therefore no overloading.......either use 2 function names or link via a lib file

Yes you can export objects, but it's not straight forward.

Normally, you export a function to create an instance of your object and return a pointer to it. You also need to export a function to destroy it.

In addition, if you want compatability between compilers, and/or between different versions of your DLL, you need to use pure virtual base classes and export pointers to these.

Here's some info:

www.bcbdev.com/articles/vcdll2.htm

No comments: