Hadi
Hadi

Reputation: 307

CWinApp dll file giving prob with CWinApp class

I am trying to link a dll file to my project in the MFC template with simple calling it and including the header file. But i am getting a assertion failure whenever i am trying to make an object of the header file of my dll Class. Both the classes are CWinApp, i further debugged and found that both the mfc WinApp applications are trying to call the same afxgetThread() function which is resulting in a assertion failure. Can anyone help me out here ? Thank you.

assertion failure getafxThread()

Assertion Failure warning

Upvotes: 0

Views: 345

Answers (1)

IInspectable
IInspectable

Reputation: 51506

Quote from CWinApp: The Application Class:

An application built on the framework must have one and only one object of a class derived from CWinApp.

Upvotes: 3

Related Questions