My application seems to work fine as a Debug build, but when I build as release it is crashing after a PostThreadMessage call. I can avoid the crash by popping an AfxMessageBox right after the call to PostThreadMessage.
AfxMessageBox("this avoids crash in the Release Build?")
The message I get is:
The instruction at "0x00000" referenced memory at "0x000000". the memory could not be "read".
Any idea what I am doing wrong or what could be causing this?