April 20th, 1999, 05:06 AM
Hi Gurus !
I have a problem with SendMessage().
In a modal dialog I make this call:
...
m_pParent->SendMessage( WM_UPDATE_DATA, m_sData );
...
'm_pParent' is a valid pointer to 'CMyMainFrm' class and the handler for the message 'WM_UPDATE_DATA' is placed in there.
Now the problem:
All works fine, if my code is compiled in debug mode. But if I compile it in release mode it breaks.
What happens is:
The message handler process the message correct.
But than the program breaks with this message:
"Unhandled exception in Myapp.exe(MFC42.DLL):0xC00000005: Access Violation."
and the debugger jumps to following code into the file 'mfc\src\Map_pp.cpp':
void* CMapPtrToPtr::GetValueAt(void* key) const
// find value (or return NULL -- NULL values not different as a result)
{
...
}
Why does my code work in debug mode but not in release mode.
What should I do to compile my code correct ??
Thanks for reading
Bye Joerg
I have a problem with SendMessage().
In a modal dialog I make this call:
...
m_pParent->SendMessage( WM_UPDATE_DATA, m_sData );
...
'm_pParent' is a valid pointer to 'CMyMainFrm' class and the handler for the message 'WM_UPDATE_DATA' is placed in there.
Now the problem:
All works fine, if my code is compiled in debug mode. But if I compile it in release mode it breaks.
What happens is:
The message handler process the message correct.
But than the program breaks with this message:
"Unhandled exception in Myapp.exe(MFC42.DLL):0xC00000005: Access Violation."
and the debugger jumps to following code into the file 'mfc\src\Map_pp.cpp':
void* CMapPtrToPtr::GetValueAt(void* key) const
// find value (or return NULL -- NULL values not different as a result)
{
...
}
Why does my code work in debug mode but not in release mode.
What should I do to compile my code correct ??
Thanks for reading
Bye Joerg