MFC Application crashes after "return" statement
<p>I have One MFC Application "A"  which loads DLL  "B" and "B" intern launches one MFC application "C"</p>

<p>Problem #1 : With DLL "B"</p>

<p>I am getting a exception while returning from function In DLL "B" , in which it launches MFC application "C" . From WinDBG i got know exception is happening after return statement.</p>

<p>I put content of function in try{}catch(...){} and I am able to catch the exception . In catch block GetLastError() returns error code 122 , which means ERROR_INSUFFICIENT_BUFFER. </p>

<p><strong>looking answers for :</strong>
1. How I can confirm about , which exception thrown in general catch block. Will getLastError() indicates the right problem in general catch(...) block ?</p>

<ol>
<li>How to over come this problem i.e. any suggestion to resolve ERROR_INSUFFICIENT_BUFFER.</li>
</ol>

<p>Problem #2 : With MFC application "C"</p>

<p>After I put general try catch block in DLL "B" I am able to launch MFC application "C" .But Application "C" crashes. From WinDBG I got to know exception is after return statement.</p>

<p>General try catch(...) did not resolve this issue .</p>

<p>Event log shows : ".....faulting module MFC80.DLL, version 6.0.6002.18005, time stamp 0x49e03821, exception code 0xc0000135, fault".</p>

<p>*<strong><em>looking answers for :</em>*</strong>
1. How to find which exception is thrown. ?</p>

<p>Thanks ,
Sharat</p>
