Author/Contact: Matthew Wilson ( http://synsoft.org/d.html, stlsoft ^at^ hotmail ^dot^ com)
Project Page: None at the moment.
Download URL: None. This will be included in the next release of Phobos.
Mailing list: None.
Pure D implementation of a free-function API and wrapper auto class for dynamic loading of executable modules, and extraction of functions from them. The API manipulates HXModule handles, and consists of the following functions:
HXModule ExeModule_Load(in char moduleName);The auto class ExeModule provides the following methods:
HXModule ExeModule_AddRef(in HXModule hModule);
void ExeModule_Release(inout HXModule hModule);
void *ExeModule_GetSymbol(inout HXModule hModule, in char symbolName);
this(in HXModule hModule, boolean bTakeOwnership);// Methods
~this(); // Calls close
void close(); // Facilitates early close// Properties
void *getSymbol(in char symbolName); // Throws ExeModuleException if symbol not found
void *findSymbol(in char symbolName); // Returns NULL if symbol not found
HXModule Handle();Status: Win32 and Linux versions implemented. Waiting for Walter's inclusion in next Phobos.
In need of help?: Not at this stage, although comment on the API / class will be welcome.
Other People Comments:
- As I personally like the coding sytle proposed at Digital Mars, that would start function names with lower-case letters, I'd like to ask: "Why do the ExeModule_ functions not follow that guideline?"
- The ExeModule_ functions are placed in the std.loader module. So why are they prefixed with ExeModule_ like old-style C name-prefixes? I think we don't need them?