Search Results

Search found 2 results on 1 pages for 'doobop'.

Page 1/1 | 1 

  • Access violation when running native C++ application that uses a /clr built DLL

    - by doobop
    I'm reorganzing a legacy mixed (managed and unmanaged DLLs) application so that the main application segment is unmanaged MFC and that will call a C++ DLL compiled with /clr flag that will bridge the communication between the managed (C# DLLs) and unmanaged code. Unfortuantely, my changed have resulted in an Access violation that occurs before the application InitInstance() is called. This makes it very difficult to debug. The only information I get is the following stack trace. > 64006108() ntdll.dll!_ZwCreateMutant@16() + 0xc bytes kernel32.dll!_CreateMutexW@12() + 0x7a bytes So, here are some sceanrios I've tried. - Turned on Exceptions-Win32 Exceptions-c0000005 Access Violation to break when Thrown. Still the most detail I get is from the above stack trace. I've tried the application with F10, but it fails before any breakpoints are hit and fails with the above stack trace. - I've stubbed out the bridge DLL so that it only has one method that returns a bool and that method is coded to just return false (no C# code called). bool DllPassthrough::IsFailed() { return false; } If the stubbed out DLL is compiled with the /clr flag, the application fails. If it is compiled without the /clr flag, the application runs. - I've created a stub MFC application using the Visual Studio wizard for multidocument applications and call DllPassthrough::IsFailed(). This succeeds even with the /clr flag used to compile the DLL. - I've tried doing a manual LoadLibrary on winmm.lib as outlined in the following note Access violation when using c++/cli. The application still fails. So, my questions are how to solve the problem? Any hints, strategies, or previous incidents. And, failing that, how can I get more information on what code segment or library is causing the access exception? If I try more involved workarounds like doing LoadLibrary calls, I'd like to narrow it to the failing libraries. Thanks. BTW, we are using Visual Studio 2008 and the project is being built against the .NET 2.0 framework for the managed sections.

    Read the article

  • Windows loader problem - turn on verbose mode

    - by doobop
    Hi, I'm in the process of reorganizing some of the legacy libraries in our application which has unmanaged code calling into libraries of managed code. While I have the code reorganized, it produces the following loader error: ... 'app.exe': Loaded 'C:\WINDOWS\system32\CsDisp.dll' 'app.exe': Loaded 'C:\WINDOWS\system32\psapi.dll' 'app.exe': Loaded 'C:\WINDOWS\system32\shell32.dll' 'app.exe': Loaded 'C:\appCode\Debug\daq206_32.dll', Binary was not built with debug information. 'app.exe': Loaded 'C:\appCode\Debug\SiUSBXp.dll', Binary was not built with debug information. 'app.exe': Loaded 'C:\appCode\Debug\AdlinkDAQ.dll', Symbols loaded. 'app.exe': Loaded 'C:\WINDOWS\system32\P9842.dll', Binary was not built with debug information. LDR: LdrRelocateImageWithBias() failed 0xc0000018 LDR: OldBase : 10000000 LDR: NewBase : 00A80000 LDR: Diff : 0x7c90d6fa0012f6cc LDR: NextOffset : 00000000 LDR: *NextOffset : 0x0 LDR: SizeOfBlock : 0xa80000 Debugger:: An unhandled non-continuable exception was thrown during process load I believe 0xc0000018 error is an overlapping address range. So, I have two questions. First, what linker options may cause this error? I'm currently linking with /DYNAMICBASE:NO and /FIXED:No as this was how some of the previous libraries were set up. Second, is there a way to turn on verbose mode for the loader so I can see what exactly it's trying to load? P9842 is a third party library so I imagine it is getting to one of my libraries after P9842 and failing on that one. Can I narrow it down? Thanks.

    Read the article

1