Export static data

Dan Dan.R.Stevens at gmail.com
Fri Aug 21 08:10:55 PDT 2009


Is there a way to export static data from a DLL written in D?

I'd like to write some extension DLLs for a program, but they need to have certain static data exports to be recognized. I've been able to export functions, but no data appears in the export table of the DLL.

In MSVC 6 I can do it as follows:
extern "C" __declspec(dllexport) ModDesc DescBlock = { ... };


Another issue I had was with the name decoration. I need to be able to export an "InitProc". The closest I was able to get was "_InitProc" and "INITPROC". Is there a way to drop the leading underscore?



More information about the Digitalmars-d-learn mailing list