
8 Dec
2004
8 Dec
'04
10:48 p.m.
Dirk Gregorius wrote:
I changed my code to this:
void DLLCreate( Interface& rInterface ) { // Implementation option #1: rInterface.reset( new InterfaceImple );
// Implementation option #2: rInterface = InterfacePtr( new InterfaceImpl ); }
Is this a valid solution as well?
Yes, it's a valid solution. Didn't occur to me that references to classes would be allowed in extern "C".
But how can I load the function than after it got mangled?
You can use the mangled name. Something like ?DLLCreate@@YA?AV?$shared_ptr@VInterface@@@boost@@XZ. :-)