Exporting classes and interfaces from DLL

Pragma eric.t.anderton at gmail.com
Wed May 14 07:40:02 PDT 2008


Yossarian Wrote:

> Hi, I've got following problem:
> I have interface, with some defined functions, + some another classes  
> derived from it in EXE ( kind of Variant type ).
> 
> class iObject { }
> class integerConst : iObject { }
> class stringConst : iObject { }
> final export T as(T)(iObject n) { if (cast(T)(n) == null) throw new  
> exception; return (cast(T)(n)); }
> 
> I want to make plugin interface - and to export these classes to it. When  
> i statically link the DLL code with
> my interface code, the DLL's string isn't the same as EXE's string.
> (Another problem is, that the exception thrown from DLL isn't catched in  
> EXE, but falls through and program crashes, but never mind)
> 
> So, I moved all of the interface code into new DLL, and link my plugina  
> and EXE against it.
> And there comes the problem :
> 
> export class integerConst : iObject { } -> doesn't export anything.
> When I export all of the (public) function, there still remains some  
> other, which are hidden,
> is there any way how to export them, or with these classes I should say  
> goodbye to plugins?

I prepared this a long time ago, but it should still be relevant:

http://www.wikiservice.at/wiki4d/wiki.cgi?BestPractices/DLL

Does this help you with your problem, or at least explain what's wrong?  

- Pragma



More information about the Digitalmars-d mailing list