www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - C++-Classes from DLL

reply Dietrich Massendieter <Dietrich_member pathlink.com> writes:
I've read the example in the D-Documentation, but there isn't explained how to
import classes from a DLL written in C++

Is it possible to call C++-Classes without a factory function?
Jul 16 2006
parent Don Clugston <dac nospam.com.au> writes:
Dietrich Massendieter wrote:
 I've read the example in the D-Documentation, but there isn't explained how to
 import classes from a DLL written in C++
 
 Is it possible to call C++-Classes without a factory function?
 
 
No. It's not even possible in C++. D can only call C++ classes via COM. This is not D's fault, the same thing is true of C++. For example, you cannot call a C++ class in a Borland C++ DLL from Microsoft C++. The only time it works at all is the special case where the executable and the DLL were both compiled with the same compiler. Utterly ridiculous.
Jul 16 2006