Click here to Skip to main content
15,905,875 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unresolved external symbol... Pin
Serge Krynine13-Aug-03 3:50
Serge Krynine13-Aug-03 3:50 
GeneralRe: Unresolved external symbol... Pin
Florin Ochiana13-Aug-03 4:29
Florin Ochiana13-Aug-03 4:29 
GeneralXcvData and adding a standard IP port Pin
Navin13-Aug-03 3:29
Navin13-Aug-03 3:29 
GeneralRe: XcvData and adding a standard IP port Pin
Navin13-Aug-03 5:34
Navin13-Aug-03 5:34 
GeneralI need to refer to the Microsoft’s non-conformance issues Pin
Anonymous13-Aug-03 3:22
Anonymous13-Aug-03 3:22 
GeneralRe: I need to refer to the Microsoft’s non-conformance issues Pin
Navin13-Aug-03 3:32
Navin13-Aug-03 3:32 
GeneralRe: I need to refer to the Microsoft’s non-conformance issues Pin
Serge Krynine13-Aug-03 3:46
Serge Krynine13-Aug-03 3:46 
GeneralRe: I need to refer to the Microsoft’s non-conformance issues Pin
Tim Smith13-Aug-03 3:50
Tim Smith13-Aug-03 3:50 
GeneralRe: I need to refer to the Microsoft’s non-conformance issues Pin
Serge Krynine13-Aug-03 3:54
Serge Krynine13-Aug-03 3:54 
Generalreading a text file Pin
VC++ Beginner13-Aug-03 2:28
VC++ Beginner13-Aug-03 2:28 
GeneralRe: reading a text file Pin
Anonymous13-Aug-03 2:52
Anonymous13-Aug-03 2:52 
GeneralRe: reading a text file Pin
Andrew Walker13-Aug-03 3:28
Andrew Walker13-Aug-03 3:28 
GeneralRe: reading a text file Pin
keegan13-Aug-03 3:34
keegan13-Aug-03 3:34 
GeneralRe: reading a text file Pin
David Crow13-Aug-03 5:36
David Crow13-Aug-03 5:36 
QuestionSendMessage??? Pin
_skidrow_vn_13-Aug-03 2:24
_skidrow_vn_13-Aug-03 2:24 
AnswerRe: SendMessage??? Pin
Florin Ochiana13-Aug-03 3:39
Florin Ochiana13-Aug-03 3:39 
GeneralRe: SendMessage??? Pin
jhwurmbach13-Aug-03 3:55
jhwurmbach13-Aug-03 3:55 
AnswerRe: SendMessage??? Pin
Navin13-Aug-03 3:44
Navin13-Aug-03 3:44 
Generalinitialization of code in CWinApp Pin
pdunn13-Aug-03 1:32
pdunn13-Aug-03 1:32 
GeneralRe: initialization of code in CWinApp Pin
jhwurmbach13-Aug-03 2:34
jhwurmbach13-Aug-03 2:34 
GeneralRe: initialization of code in CWinApp Pin
pdunn13-Aug-03 2:58
pdunn13-Aug-03 2:58 
GeneralRe: initialization of code in CWinApp Pin
jhwurmbach13-Aug-03 3:29
jhwurmbach13-Aug-03 3:29 
GeneralRe: initialization of code in CWinApp Pin
pdunn14-Aug-03 4:22
pdunn14-Aug-03 4:22 
Thanks for the reply.

My code is not being skipped. It is the MFC, appcore.cpp. The (+) denotes where I placed a break point.

CWinApp::CWinApp(LPCTSTR lpszAppName)
{
(+) if (lpszAppName != NULL)
m_pszAppName = _tcsdup(lpszAppName);
else
m_pszAppName = NULL;

// initialize CWinThread state
AFX_MODULE_STATE* pModuleState =
_AFX_CMDTARGET_GETSTATE();
AFX_MODULE_THREAD_STATE* pThreadState =
pModuleState->m_thread;
ASSERT(AfxGetThread() == NULL);
pThreadState->m_pCurrentWinThread = this;
ASSERT(AfxGetThread() == this);
m_hThread = ::GetCurrentThread();
m_nThreadID = ::GetCurrentThreadId();

// initialize CWinApp state
ASSERT(afxCurrentWinApp == NULL);

// only one CWinApp object please
pModuleState->m_pCurrentWinApp = this;
ASSERT(AfxGetApp() == this);

// in non-running state until WinMain
(+) m_hInstance = NULL;
m_hLangResourceDLL = NULL;
m_pszHelpFilePath = NULL;
m_pszProfileName = NULL;
m_pszRegistryKey = NULL;
m_pszExeName = NULL;
m_pRecentFileList = NULL;
m_pDocManager = NULL;
m_atomApp = m_atomSystemTopic = NULL;
m_lpCmdLine = NULL;
m_pCmdInfo = NULL;
...}

The second breakpoint at 'm_hInstance = NULL;' never gets called because that is where the code skips causing 'm_pDocManager' not to get initialize. Thus when the program is closed, an error occurs because the program is trying to delete an uninitialized pointer.

The value inside of m_pDocManager is junk. Furthermore, the second breakpoint has a '?' (question mark) inside of it. I don't know what this means.

Thus the error does not come from the initInstance like I first thought but the constructor of CWinApp.



GeneralRe: initialization of code in CWinApp Pin
jhwurmbach14-Aug-03 4:38
jhwurmbach14-Aug-03 4:38 
GeneralNetwork Discovery & Remote execute Pin
maranv13-Aug-03 0:06
maranv13-Aug-03 0:06 

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.