473,772 Members | 2,510 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application Crash with mixed Mode DLL

I have an unmanaged MFC application linked to a mixed mode MFC extension dll
(.NET 2.0/VS 2005) . I followed all the instructions correctly and ensured
that no managed code gets called from the DllMain. When I run the application
it just crashes.

Unhandled exception at 0x013f288e in ImpEDC.exe: 0xC0000005: Access violation.

Hereis the stack trace

013f288e()
ntdll.dll!_Ldrp CallInitRoutine @16() + 0x14 bytes
ntdll.dll!_Ldrp RunInitializeRo utines@4() + 0x1c7 bytes
ntdll.dll!_Ldrp GetProcedureAdd ress@20() + 0x1c3 bytes
ntdll.dll!_LdrG etProcedureAddr ess@16() + 0x18 bytes
ntdll.dll!_Ldrp CorValidateImag e@8() + 0x3ec bytes
ntdll.dll!_Ldrp CheckCorImage@1 6() + 0x25 bytes
ntdll.dll!_Ldrp MapDll@24() + 0x17036 bytes
ntdll.dll!_Ldrp LoadImportModul e@20() + 0x783 bytes
ntdll.dll!_Ldrp HandleOneOldFor matImportDescri ptor@16() + 0x4c bytes
ntdll.dll!_Ldrp HandleOldFormat ImportDescripto rs@16() + 0x2e bytes
ntdll.dll!_Ldrp WalkImportDescr iptor@8() + 0x11d bytes
ntdll.dll!_Ldrp InitializeProce ss@20() + 0x8b4 bytes
ntdll.dll!__Ldr pInitialize@12( ) + 0x88d3 bytes
ntdll.dll!_KiUs erApcDispatcher @20() + 0x7 bytes

When I delay load the same dll everything works properly? It is only this
app which has Any ideas what may be wrong or on how to trouble shoot? The
same dll works on other small test apps. When I unlink the dll from the main
app everything works fine.

Feb 14 '06 #1
1 1813
When I delay load the same dll everything works properly? It is only this
app which has Any ideas what may be wrong or on how to trouble shoot? The
same dll works on other small test apps. When I unlink the dll from the main
app everything works fine.


Is the application linked with any other DLLs (non-system)? If it is, I would suspect
those DLLs (the code they run in DllMain and constructors of global objects).

If it does not help, try to run the application under WinDbg and post the output
of the following commands (at the moment of the exception):

r
kb
!lmi yourdll.dll
!address 0x013f288e

http://www.microsoft.com/whdc/ddk/de...g/default.mspx

Regards,
Oleg
[VC++ MVP http://www.debuginfo.com/]



Feb 15 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2201
by: Mike Kamzyuk | last post by:
Hello all. Basically, I need to call a mixed-mode dll's function (which uses managed code) from a native or mixed-mode dll function (which does not use managed code). I'm wondering if this could be accomplished and how. Here's the problem. We have a third party app (TPA) capable of loading native and mixed-mode dlls somehow (we don't know how). It loads our native dll (OND) and allows us to use our code inside the app (that is, we...
6
3684
by: GL | last post by:
I am getting a crash while exiting from my application. Pl find the Stack Trace of the crash: System.Windows.Forms.Application.ThreadWindows.ThreadWindows(System.Windows.Forms.Control parent = <undefined value>, bool onlyWinForms = true) + 0x8c bytes system.windows.forms.dll!ThreadContext.DisposeThreadWindows() + 0x54 bytes system.windows.forms.dll!ThreadContext.Dispose() + 0xa1 bytes...
0
1677
by: Edward Diener | last post by:
I have some questions about the instructions for creating a mixed mode DLL in the MSDN topic "Converting Managed Extensions for C++ Projects from Pure Intermediate Language to Mixed Mode" in the "Managed Extensions for C++ Reference". 1) The first instruction in converting to mixed mode is to link with /NOENTRY. This occurs despite the fact that a pure mode DLL is already set up with this option in the linker, and the previous...
9
2592
by: Edward Diener | last post by:
I received no answers about this the first time I posted, so I will try again. My inability to decipher an MSDN topic may find others who have the same inability and someone who can decipher and explain it. I have some questions about the instructions for creating a mixed mode DLL in the MSDN topic "Converting Managed Extensions for C++ Projects from Pure Intermediate Language to Mixed Mode" in the "Managed Extensions for C++ Reference"....
7
1694
by: Staale L. Hansen | last post by:
We have an application which uses some mixed-mode code to expose a .NET 1.1 managed API. Only the necessary files are compiled with /clr. We want to be able to load the application without .NET present, and then just disable the API. But we are not even able to give an error message when we start the application without mscoree.dll present. We have tried delay-loading mscoree.dll, but that did not help because the OS loader (at least on...
1
2259
by: tony | last post by:
hi. my NET application is using mixed c++ dll ( managed and unmanaged) in that dll , im calling api's of unamanged dll. my application crash with no exception or warning. its hard to find when the crash happen ,and where.
8
2322
by: Edward Diener | last post by:
By reuse, I mean a function in an assembly which is called in another assembly. By a mixed-mode function I mean a function whose signature has one or more CLR types and one or more non-CLR types. The problem: I have a number of mixed-mode functions which I want reuse. These functions revolve around converting a CLR String to a C++ std::string or
7
1625
by: Ashutosh Bhawasinka | last post by:
Hi, I have a C# .Net application which needs to use some feature which can be only developed in Visual C++ (its extended MAPI). The C# exe will be supplied to users without a setup. What kind of exe/dll should I develop in Visual C++ so that I can meet these requirements 1) No administrator rights are required
7
1445
by: Warren Tang | last post by:
Hi everyone I have a web application that is built for ASP.NET 2.0. Now I want to update it to 3.5, so that I can use the AJAX controls. What are the risks if I update it? What are the things that I need to pay attention to? Thanks in advance for your guidance!
0
10106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7461
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4009
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2851
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.