Link to home
Start Free TrialLog in
Avatar of headley
headley

asked on

Explicit DLL Linking

I need some help using an exported class from a regular DLL statically linked with MFC.  Basically, I want to avoid distributing .lib files, or requiring the use of IMPLIB32.  I know that I need to use LoadLibrary("MYDLL.DLL"), but then how to I access a class that was exported in the DLL with the AFX_EXT_CLASS macro?  I can find lots of info on using GetProcAddress to access exported c++ functions, but no info on how to access exported classes from the DLL.

Thanks in advance
Avatar of jhance
jhance

It's not clear to me what you are try to do with your DLL.  You mentioned distributing .lib files.  If you are making a DLL that will be distributed to others for their use in RUNNING your application, then there is no need to distribute a .lib file.  If, however, you are distributing a DLL for other DEVELOPERS to use in building their applications, then you must distribute a .lib file so that they can link their application to your DLL.  If you would explain more clearly and in greater detail what you are trying to do, I think it would help in providing an answer.
ASKER CERTIFIED SOLUTION
Avatar of galkin
galkin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of headley

ASKER

Thanks for the help.  It was my understanding that an extension DLL required other developers to use MFC... and would not allow others to use my DLL in another environment, say Visual Basic (yuck!).  Anyway, the comments helped for the most part, and I'll just continue along those lines.