C# Interop

Eelco Hoogendoorn hoogendoorn.eelco at gmail.com
Mon Jan 31 13:25:11 PST 2011


Hi all,

At work I currently develop in C++ with a C# front-end, using CLI interop.

Ive been using D for quite a while for hobby projects, and needless to say, it
makes C++ feel like masochism. Id like to convince my coworkers that adding D
in the mix is more than just another complication.

But im not quite sure what would be the best way to do C# and D interop. CLI
will no longer do me any good I fear.

Do I just create a D DLL with a bunch of free extern(C) function for
communication? What about marshalling? Is using unsafe pointers back and forth
the best I can do? C# can read from a pointer allocated by D in unsafe mode,
and D can read from a pinned C# pointer, right?

(no, im not looking for D.NET; what I miss in C# is to-the-metal /
compilation.)


More information about the Digitalmars-d mailing list