DLL in D based on Tango
Sean Kelly
sean at f4.ca
Mon Jul 9 11:54:50 PDT 2007
BLS wrote:
> Hello,
> My question is :
> Can I create a DLL written in *D* having a simple C Interface *A*
> scripting language can use ?
> Probabely yes.
> Using TANGO ? I do not know.
Tango has two routines for initializing and terminating the runtime:
extern (C) bool rt_init( void delegate( Exception ) dg = null );
extern (C) bool rt_term( void delegate( Exception ) dg = null );
Call these in DllMain or wherever appropriate. The delegate will be
passed any exceptions thrown while the functions are processing, and
will return true/false on success/failure.
As for the rest, building a DLL in Tango should be the same as doing so
with Phobos.
Sean
More information about the Digitalmars-d
mailing list