Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MFC-DLL State

Posted on 1998-09-08
2
Medium Priority
?
292 Views
Last Modified: 2013-11-20
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?
0
Comment
Question by:ysbhushan
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
Andy_Keys earned 200 total points
ID: 1321919
I assume you tried swapping the lines of code!
i.e. CFrame::OnClose(); before EndModalLoop(0);
0
 
LVL 1

Expert Comment

by:Andy_Keys
ID: 1321920
Sorry, Should have posted this as a comment not an answer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Integration Management Part 2
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question