Dynamic Libaries in D

Christopher Wright dhasenan at gmail.com
Mon Oct 13 16:41:42 PDT 2008

Tim M wrote:
> So do I just have to use C/C++ and is there any plans / current projects 
> that this may change in future?

No, you just have to do this:

extern (Windows)
	// The application calls this
	void someDllFunc ()
		// regular D code here


void someNonDllFunc ()
	// The application doesn't see this.

extern (Windows) tells the compiler to disguise the functions so they 
look like regular C functions in the resulting object file. It doesn't 
change the meaning of any code inside.

More information about the Digitalmars-d-learn mailing list