Hoe to create a DLL with imports that should be used from different mainprograms

Skip to first unread message


Jul 8, 2004, 11:25:32 AM7/8/04
Dear Gurus,

I am on MSDEV 6.0 working from the command line.

I am trying to generate a DLL that imports symbols from
a main program. The DLL should be used by different main
programs that all contain the same symbols.

The usual approach, if the DLL is only used from one
main program would be to simply link the DLL against the
export library of the main program.
However if I do exactly that, then the other main programs
will crash with the DLL when the DLL calls functions from
the main program. (the reason being that the dll has somehow
incorporated the name of the main program of which the symbols
were imported at DLL link time).

So how can I properly create a DLL that imports symbols
from the main program without telling the DLL anything
else then the names of the symbols that will be imported?
And how can I tell the DLL the imported symbolnames without using the
export lib of a main program?

thank you very much for any insights


Reply all
Reply to author
0 new messages