Jump to content
  • Advertisement
Sign in to follow this  

Using static MFC library and implementing DllGetClassObject

This topic is 2167 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I make an MFC ActiveX component in Visual C++ 2005 and need to link the C++ runtime and MFC as static libraries to reduce the DLL hell for end users. The problem seems to be that the static library did not implement the methods that existed in the dynamic version of MFC.

I have implemented my own DllCanUnloadNow with a use counter but I can't implement DllGetClassObject because everything in MFC is hidden with many layers of inheritance and thin documentation.

I have access to my own control class inheriting COleControl but I can't find access to the class ID (CLSID m_clsid) or the hidden factory class implementing QueryInterface.

Share this post


Link to post
Share on other sites
Advertisement
It seems that the runtime dependency was removed when I selected to use a static MFC so that I removed it twice. Now it is working without dependencies to the MFC or C++ runtime. Edited by Dawoodoz

Share this post


Link to post
Share on other sites
Now the dynamic library is back somehow and causing link errors.

Compiling the same code again caused the error to disappear. biggrin.png Edited by Dawoodoz

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!