Access violation in AFX_MAINTAIN_STATE2::AFX_MAINTAIN_STATE2 -
10-08-2007
, 01:31 PM
Hi
I have spent enough time and desperately need some help.
This is what I am trying to do-
We have 3 layers -
1. Unamanged - 3rd Party MFC Extention dll
2. Managed c++ (CLR/CLI) Wrapper - This one acts as a bridge between managed
and unmanaged
3. C# - GUI that uses Managed C++ to communicate with Unamanaged
Every thing in VS2005.
I have to write MC++ (.NET 2.0) wrapper around a third party MFC dll (I
think this is an mfc extension dll. Actually this was originally a MFC exe
and they just modified it and distributed as dll, so that their classes can be
used in C# via a MC++ wrapper)
Their dll has a Initialize function that brings up a MFC dialog box, which
is the starting point.
So MC++ wrapper should call the method void Initialize( ) from the DLL. The
moment I call this function, i am getting an access violation error. This is
exactly the error i am getting - "Attempt to read or write protected memory.
This is often an indication that other memory is corrupt".
I'd greatly appreciate if you could kindly show me some light. Is there
something wrong with my settings? Have no clue?
Any help would be much appreciated |