Access violation in AFX_MAINTAIN_STATE2::AFX_MAINTAIN_STATE2

  • Thread starter Thread starter sri.raghav
  • Start date Start date
S

sri.raghav

Hi
We have 3 layers -

1. Unamanged - 3rd Party MFC dll
2. Managed c++ (CLR/CLI) - This one acts as a bridge between managed
and unmanaged
3. C# - GUI that uses Managed C++ to communicate with Unamanaged

The unamanged DLL exposes a Initialize function, which is suppose to
do some initialization and then pop up a dialog box. LoadLibrary
returns success, so does GetProcAddress. But the moment i call the
initialize function it crashes -
Access violation writing location 0x04050eb2

I am trying to Use MFC in a Shared DLL (not sure how the DLL is
referencing MFC)

Any help would be much appreciated

thanks
 
Back
Top