[EMAIL PROTECTED] wrote: > "Igor Tandetnik" <[EMAIL PROTECTED]> wrote: > >>> This all works great on Unix. When I use dlopen() to >>> attach the shared library, the procA() reference in >>> the shared library is automatically resolved to the >>> address of procA() in the main program. >>> >> On Windows, the loader works in a very different way. Basically, >> export/import connections are established at link time, not at load >> time. The loader does not perform a symbol search over all the DLLs, the >> import tables in the executable image (emitted by the linker) tell it >> exactly where to look. >> >> > >
That explanation does not seem entirely accurate (especially the second sentence). If that were true, it owuld not be possible to release an updated DLL with re-arranged entry points and expect the caller EXE or DLL to link to it properly; yet that works. Refer to the blog of the guy at Microsoft who wrote (or rewrote) the DLL loader: http://blogs.msdn.com/mgrier/rss.aspx > The disadvantages to the windows approach are obvious. > Before I add this characteristic to the ever-growing > list of reasons why I hate windows and especially hate > programming for windows, I should be fair and ask if > there are any advantages to the windows way of doing > things that I have overlooked. > > -- > D. Richard Hipp <[EMAIL PROTECTED]> > >