Click here to Skip to main content
16,004,924 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Adding member variables crashes app Pin
Wheatbread31-Jul-06 10:35
Wheatbread31-Jul-06 10:35 
AnswerRe: Adding member variables crashes app Pin
Zac Howland31-Jul-06 10:13
Zac Howland31-Jul-06 10:13 
GeneralRe: Adding member variables crashes app Pin
Wheatbread31-Jul-06 10:37
Wheatbread31-Jul-06 10:37 
GeneralRe: Adding member variables crashes app [modified] Pin
Zac Howland31-Jul-06 10:47
Zac Howland31-Jul-06 10:47 
GeneralRe: Adding member variables crashes app Pin
Wheatbread31-Jul-06 11:06
Wheatbread31-Jul-06 11:06 
GeneralRe: Adding member variables crashes app Pin
Zac Howland31-Jul-06 11:14
Zac Howland31-Jul-06 11:14 
GeneralRe: Adding member variables crashes app Pin
Wheatbread1-Aug-06 12:28
Wheatbread1-Aug-06 12:28 
GeneralRe: Adding member variables crashes app Pin
Zac Howland1-Aug-06 17:07
Zac Howland1-Aug-06 17:07 
Wheatbread wrote:
CMyDriver * hUserDriver = (CMyDriver *)i_hIDriver;
hUserDriver->Destroy();
delete hUserDriver;
}

My app crashes at the 'delete hUserDriver'. EndDriver is an exposed interface call that another DLL calls to detroy the driver. hUserDriver->Destroy() destroy all internal structures of CDriver (not CMyDriver, as this function isnt overloaded in CMyDriver). CMyDriver is not referencing any objects destroyed by the Destroy call. Nothing is available in the debugger as its all assembly at that point.


Does Destroy get called from any of those destructors (or is anything that is cleaned up in Destroy also cleaned up in any of the destructors)?


Wheatbread wrote:
CMyDriver * hUserDriver = (CMyDriver *)i_hIDriver;


Just FYI, this is a dangerous cast. You should use dynamic_cast or reinterpret_cast to do this (and check the return value). This shouldn't be the cause of your problem, though.

If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac

Questionsubitem in CListCtrl Pin
Tara1431-Jul-06 9:46
Tara1431-Jul-06 9:46 
AnswerRe: subitem in CListCtrl Pin
Hans Dietrich31-Jul-06 10:07
mentorHans Dietrich31-Jul-06 10:07 
GeneralRe: subitem in CListCtrl Pin
Tara1431-Jul-06 18:37
Tara1431-Jul-06 18:37 
QuestionRe: subitem in CListCtrl Pin
David Crow31-Jul-06 10:20
David Crow31-Jul-06 10:20 
AnswerRe: subitem in CListCtrl Pin
Tara1431-Jul-06 18:53
Tara1431-Jul-06 18:53 
AnswerRe: subitem in CListCtrl Pin
Michael Dunn31-Jul-06 17:57
sitebuilderMichael Dunn31-Jul-06 17:57 
GeneralRe: subitem in CListCtrl [modified] Pin
Tara1431-Jul-06 19:39
Tara1431-Jul-06 19:39 
AnswerRe: subitem in CListCtrl Pin
Hamid_RT31-Jul-06 18:52
Hamid_RT31-Jul-06 18:52 
GeneralRe: subitem in CListCtrl Pin
Tara1431-Jul-06 18:58
Tara1431-Jul-06 18:58 
GeneralRe: subitem in CListCtrl Pin
Tara1431-Jul-06 21:53
Tara1431-Jul-06 21:53 
Questiondebugging VS6.0 C (not ++)... how to view entire array contents? Pin
Jesse Evans31-Jul-06 9:35
Jesse Evans31-Jul-06 9:35 
AnswerRe: debugging VS6.0 C (not ++)... how to view entire array contents? Pin
David Crow31-Jul-06 9:47
David Crow31-Jul-06 9:47 
GeneralRe: debugging VS6.0 C (not ++)... how to view entire array contents? Pin
Jesse Evans31-Jul-06 11:15
Jesse Evans31-Jul-06 11:15 
AnswerRe: debugging VS6.0 C (not ++)... how to view entire array contents? Pin
valikac31-Jul-06 9:47
valikac31-Jul-06 9:47 
AnswerRe: debugging VS6.0 C (not ++)... how to view entire array contents? Pin
krmed31-Jul-06 10:22
krmed31-Jul-06 10:22 
GeneralRe: debugging VS6.0 C (not ++)... how to view entire array contents? Pin
Jesse Evans31-Jul-06 11:16
Jesse Evans31-Jul-06 11:16 
GeneralRe: debugging VS6.0 C (not ++)... how to view entire array contents? Pin
Jesse Evans31-Jul-06 11:18
Jesse Evans31-Jul-06 11:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.