Re: Loading DLLs by name

xxxxx@storagecraft.com said:

You must be the EXE with exported symbols - a .LIB will be built, then
use the LIB in the DLL build.

I knew it was something painfully obvious, like that:-) The trick seems
to be to write a .def file for the .exe. That should get me the .LIB that
the plug-ins link against.

Thanks for the tip.

Steve Williams “The woods are lovely, dark and deep.
xxxxx@icarus.com But I have promises to keep,
xxxxx@picturel.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep.”

>I have a program (a Verilog compiler) that under Linux is learning to load

plug-in modules by a name given on the command line. The module provides a
handful of entry points for performing actions, and calls functions in the
core program to access data about the design.

I saw this done a bunch of years ago, as I remember, the DLL startup code
can call GetProcAddress with a module handle of 0, which will look in the
current EXE for symbols. You need to export them from the EXE with a .DEF
file too. I believe you can also call GetModuleHandle with a null name to
get a handle for the EXE.

  • Jan