469,140 Members | 1,157 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,140 developers. It's quick & easy.

ExecutionEngineException and access violation

My application fails during initialization of the dlls
with an ExecutionEngineException and a access violation in
the MFC app. The structure of the program looks like:

MFC app -> mixed DLL -> managed DLL (C#)

Because the exception/access violation occures during
startup none of my breakpoints are reached.

I disabled the access to the DLL step by step and
recognized that a statement in the OnInitDialog causes the
problem. Unfortunately it is the creation of the object
which (unmanaged) class is stored inside the mixed DLL.

The statement is really simple:
m_pUnmanagedSocket = new CUnmanagedSocket();

The CUnmanagedSocket accesses a managed class internally.

BTW the OnInitDialog method is never called before the
execution stops.

I tried the /NOENTRY flag but without success. Could it be
a problem that the mixed DLL is statically linked?

I really appreciate any help, hints or comments on this
topic because at the moment I simply have no idea how to
solve this problem.

Thanks in advance

Thomas
Nov 16 '05 #1
1 1846
"Thomas Albrecht" <al******@logcontrol.de> wrote in message
news:0a****************************@phx.gbl...
My application fails during initialization of the dlls
with an ExecutionEngineException and a access violation in
the MFC app. The structure of the program looks like:

MFC app -> mixed DLL -> managed DLL (C#)

Because the exception/access violation occures during
startup none of my breakpoints are reached.


If you run your app under WinDbg [http://www.microsoft.com/ddk/debugging/]
you can catch access violations and similar during startup.
I have used this technique to sort out an access violation with loading a
mix of DbgHelp and ImageHlp in the same process.

Roger Orr
--
MVP in C++ at www.brainbench.com
Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Steven Reddie | last post: by
1 post views Thread by John O'Neill | last post: by
6 posts views Thread by Magnus Ullberg | last post: by
reply views Thread by Microsoft News | last post: by
2 posts views Thread by TT (Tom Tempelaere) | last post: by
14 posts views Thread by TT (Tom Tempelaere) | last post: by
2 posts views Thread by Michael | last post: by
39 posts views Thread by Martin | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.