Making plugin system with shared libraries. Upcast in shared lib
MrSmith via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Oct 21 14:50:53 PDT 2014
On Tuesday, 21 October 2014 at 13:57:23 UTC, Kagamin wrote:
> On Monday, 20 October 2014 at 15:07:43 UTC, MrSmith wrote:
>> On Monday, 20 October 2014 at 14:05:29 UTC, Kagamin wrote:
>>> Do it the COM way: publish IModule2 interface and declare
>>> GetInterface method, which will return a prepared pointer,
>>> which you would reinterpret cast to IModule2.
>>
>> Will it work on linux with simple .so libs?
>> I want it to be as simple as possible.
>
> Is it any different from what you already have?
> Dynamic cast is not guaranteed to work across dll boundary. If
> it does, you're lucky. If it doesn't, use GetInterface - that
> will work independently from runtime, environment, language,
> os, hardware etc.
What is GetInterface?
More information about the Digitalmars-d-learn
mailing list