'GRACE.exe': Loaded 'C:\VCProjects\GRACE\debug (with profiler)\SPIRITViewer_MCPP.dll', Symbols loaded.
'GRACE.exe': Loaded 'C:\Windows\System32\mscoree.dll', No symbols loaded.
'GRACE.exe': Loaded 'C:\Windows\System32\d3dx9_31.dll', No symbols loaded.
'GRACE.exe': Loaded 'C:\Windows\System32\msvcrt.dll', No symbols loaded.
...snip...
First-chance exception at 0x777d3387 in GRACE.exe: 0xC0000005: Access violation writing location 0x00000014.
Unhandled exception at 0x777d7dfe in GRACE.exe: User breakpoint.
The first dll is my Managed C++ wrapper, so it seems to be loading okay. But then I just get that exception before the WinMain function gets called.
Any thoughts?
I'm using Microsoft Visual Studio .NET 2003 under Windows Vista SP1
[.net] Calling Managed C++ DLL from Native C++
Hi there,
I'm experimenting with pushing some of my UI functionality out of my native C++ app and into a C# DLL. I've got the COM route working (based on this), but for various reasons I would like to at least try a different method for comparison: creating a Managed C++ wrapper DLL and then calling that from my unmanaged C++ code.
I'm basing this approach on this article: http://blogs.msdn.com/borisj/archive/2007/02/09/interop-101-part-5.aspx
It all compiles and everything, but when I come to run it, I get an exception. The output looks like this:
All I can tell you from that is that it looks like you tried to access an offset from a null pointer, possibly by trying to access a member on a null instance. I imagine that's not helpful.
Quote:Original post by Promit
All I can tell you from that is that it looks like you tried to access an offset from a null pointer, possibly by trying to access a member on a null instance. I imagine that's not helpful.
No, not really - my problem is that the error occurs *before* any of my code runs, so I have no idea how to go about debugging this...
Well, based upon this knowledge-base article, it seems that I needed this line in my Managed C++ DLL:
That fixed it
#using <mscorlib.dll>
That fixed it
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement