Link to home
Start Free TrialLog in
Avatar of ysbhushan
ysbhushan

asked on

MFC-DLL State

I created an MFC DLL which will be launched on a thread from a Driver. The Window of the DLL is made Modal by using RunModalLoop().

But the following chunk of code is giving Access Violation

CMainFrm::OnClose()
{
  //My Processing
  EndModalLoop(0);
  CFrameWnd::OnClose()
}

The access violation is due to the DestroyWindow() in       CFrameWnd::OnClose(). The function ContinueModal is failing because the MainFrame exists no more.

Can anyone help me?
ASKER CERTIFIED SOLUTION
Avatar of Andy_Keys
Andy_Keys

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 Andy_Keys
Andy_Keys

Sorry, Should have posted this as a comment not an answer