On Saturday, 31 March 2018 at 08:33:19 UTC, Rainer Schuetze wrote:
I guess you want to cast to a class that is only defined in the
dynamically loaded DLL? The problem is that casting needs a
reference to the class info of the target class which only
exists in the referenced DLL, which needs static DLL linkage.
One suggestion would be to export a common class/interface
definition from a DLL that is referenced by both the dynamic
DLL and the loading executable.
Common class defined in static lib linked with both exe & dll.
Cast to classes seems to be working when done through void*
first. But unfortunattely interface casts didn't work
correctly(vtable issues).