c++ - Call to AfxOleTerm in a MFC application prior to using a DLL -


in mfc application, afxoleinit() method called in application initinstance() method. need call method because using ole objects in application.

i using dll doesn't work if afxoleinit() has been called.

i thinking about:

  • calling afxoleterm() prior loading dll,
  • doing have dll,
  • calling afxoleinit() afterwards (in main program, not in dll).

is acceptable solution?

note in practice, if this, dll behaves properly.

calling afxoleterm prior dll calls no idea. reason simple: doing may cause created com objects thread destroyed, or nay not accessible longer.

anyway calling afxoleinit inside dll no idea. problem is, call specific thread.

only application should call afxoleinit in thread , should perform further action.

and make more complicated, depends on model of mfc using. sharing mfc in dll cause afxoleinit act different using statically linked dll.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -