Skip to main content

Posts

Showing posts from May, 2009

Create and Use DLL's in D Mars Digital

This is a DLL written in the D Digital Mars language.

Also, there is a main D Digtal Mars class which invokes methods in the DLL, made with the D Digital
Mars language.

The source code to the whole project is included here, including the build file which is a batch file.

The Tango Library is in a serparate directory that the project file folders. A bit of reverse engineering will need to be done from the build.bat file to place all the files in the correct locations :(

The code is also available from http://code.google.com/p/tsglobalvariable/

I've remembered to include the sc.ini file for configuring the DMD and Tango libraries.


module dll.Dll; import tango.sys.win32.Types; import tango.io.Stdout; // The core DLL init code. extern (C) bool rt_init( void delegate( Exception ) dg = null ); extern (C) bool rt_term( void delegate( Exception ) dg = null ); HINSTANCE g_hInst; extern (Windows) BOOL DllMain(HINSTANCE hInstance, ULONG ulReason, LPVOID pvReserved) { switch (ulReas…