Jump to content

  • Log In with Google      Sign In   
  • Create Account


Using static MFC library and implementing DllGetClassObject


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Dawoodoz   Members   -  Reputation: 294

Like
0Likes
Like

Posted 13 June 2012 - 01:51 PM

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.

My open source DirectX 10/11 graphics engine. https://sites.google.com/site/dawoodoz

"My design pattern is the simplest to understand. Everyone else is just too stupid to understand it."


Sponsor:

#2 Dawoodoz   Members   -  Reputation: 294

Like
0Likes
Like

Posted 14 June 2012 - 07:30 AM

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, 14 June 2012 - 07:58 AM.

My open source DirectX 10/11 graphics engine. https://sites.google.com/site/dawoodoz

"My design pattern is the simplest to understand. Everyone else is just too stupid to understand it."


#3 Dawoodoz   Members   -  Reputation: 294

Like
1Likes
Like

Posted 15 June 2012 - 01:31 PM

Now the dynamic library is back somehow and causing link errors.

Compiling the same code again caused the error to disappear. Posted Image

Edited by Dawoodoz, 15 June 2012 - 01:34 PM.

My open source DirectX 10/11 graphics engine. https://sites.google.com/site/dawoodoz

"My design pattern is the simplest to understand. Everyone else is just too stupid to understand it."





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS