HighTechTalks DotNet Forums  

Access violation in AFX_MAINTAIN_STATE2::AFX_MAINTAIN_STATE2

Dotnet Framework (CLR) microsoft.public.dotnet.framework.clr


Discuss Access violation in AFX_MAINTAIN_STATE2::AFX_MAINTAIN_STATE2 in the Dotnet Framework (CLR) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Sri
 
Posts: n/a

Default 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

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.