From: Weichao Wang on 22 Feb 2010 07:45 Hi all, After I've assigned a variable to an edit control, the project can be compiled without error, but at execution an error occurs: Unhandled exception in prog.exe: 0xC0000005: Access Violation. The program stopped within the method InitInstance() in the code line: m_pMainWnd = &dlg; i.e. the program does not reach my own code. This is in Visual C++ 6.0. Has someone a clue for this? many thanks in advance! -- Weichao Wang
From: Scott McPhillips [MVP] on 22 Feb 2010 09:04 "Weichao Wang" <weichao_wang(a)hotmail.com> wrote in message news:5009889D-AA6C-41B1-B590-246FAF8B60C1(a)microsoft.com... > Hi all, > After I've assigned a variable to an edit control, the project can be > compiled without error, but at execution an error occurs: > Unhandled exception in prog.exe: 0xC0000005: Access Violation. > The program stopped within the method InitInstance() in the code line: > m_pMainWnd = &dlg; > i.e. the program does not reach my own code. > This is in Visual C++ 6.0. > Has someone a clue for this? many thanks in advance! > -- > Weichao Wang Single step into the problem area with the debugger. One possibility is that the previous line of code created dlg, which means it executed any code you may have in the dlg constructor. -- Scott McPhillips [VC++ MVP]
From: Alexander Grigoriev on 22 Feb 2010 09:50 Try to do full rebuild. Sometimes changes in .h files don't trigger build of all affected sources. "Weichao Wang" <weichao_wang(a)hotmail.com> wrote in message news:5009889D-AA6C-41B1-B590-246FAF8B60C1(a)microsoft.com... > Hi all, > After I've assigned a variable to an edit control, the project can be > compiled without error, but at execution an error occurs: > Unhandled exception in prog.exe: 0xC0000005: Access Violation. > The program stopped within the method InitInstance() in the code line: > m_pMainWnd = &dlg; > i.e. the program does not reach my own code. > This is in Visual C++ 6.0. > Has someone a clue for this? many thanks in advance! > -- > Weichao Wang
From: Weichao Wang on 22 Feb 2010 16:15 That's the point! Thank you, Alexander! -- Weichao Wang "Alexander Grigoriev" wrote: > Try to do full rebuild. Sometimes changes in .h files don't trigger build of > all affected sources. > > "Weichao Wang" <weichao_wang(a)hotmail.com> wrote in message > news:5009889D-AA6C-41B1-B590-246FAF8B60C1(a)microsoft.com... > > Hi all, > > After I've assigned a variable to an edit control, the project can be > > compiled without error, but at execution an error occurs: > > Unhandled exception in prog.exe: 0xC0000005: Access Violation. > > The program stopped within the method InitInstance() in the code line: > > m_pMainWnd = &dlg; > > i.e. the program does not reach my own code. > > This is in Visual C++ 6.0. > > Has someone a clue for this? many thanks in advance! > > -- > > Weichao Wang > > > . >
|
Pages: 1 Prev: Problem using unmanaged code in /clr application Next: Building 64bit/32bit targets |