making a really simple dll.

Trass3r un at known.com
Thu Aug 18 11:58:43 PDT 2011


> I looked at the dll documentation and I'm baffled by the time I get to  
> the first
> line: __gshared HINSTANCE g_hInst; and then it starts talking about
> dll_process_attach. I don't want to attach processes, I want to compute  
> an integer.

The Dllmain is needed so the D runtime is properly initialized.
Just copy the code http://www.d-programming-language.org/dll.html into a  
dllmain.d and put your actual code in other modules.
You don't need to do the EXPORTS shit in the .def file though, just use  
the export keyword.


More information about the Digitalmars-d-learn mailing list