Hello,
Am I mistaken in thinking that if I have a mc++ dll that I should be able to
link against it (so long as it has exported symbols via declspec(dllexport))
in an unmanaged application?
I am currently testing this and it fails. I have a native, unmanaged test
application that links against my mc++ dll with a function entry point.
Linking works fine, no errors. When I try to run in the debugger I see the
output below (abreviated for clarity).
test44.exe is my (native) test app. It clearly loads first ntdll.dll and
kernel32.dll. Then it loads one of my native dlls, txfoundation.dll. This
dll is linked against the mc++ compiled utilities_c.dll, which then brings
in mscoree.dll. Various other dlls are loaded (all native) and then at the
end it tries to load mscorwks.dll, msvcr71.dll, fusion.dll, and finally
mscorlib.dll. I'm assuming that the exception occurs while attempting to
load mscorlib.dll.
I thought that this should be possible. If not, how do I write a native
application that can link and load a managed c++ compiled dll (which has
references to various other managed assemblies)? I assume this is possible?
Pointers, help is appreciated. Thanks!
-Eric Twietmeyer
PS I can of course provide more details as necessary, for instance compile
and link options for the various pieces....
'test44.exe': Loaded 'K:\home\ept\code\tests\test44\Debug\test44.exe',
Symbols loaded.
'test44.exe': Loaded 'C:\WINDOWS\SYSTEM32\ntdll.dll', No symbols loaded.
'test44.exe': Loaded 'C:\WINDOWS\SYSTEM32\KERNEL32.DLL', No symbols loaded.
'test44.exe': Loaded 'Z:\dll\bin\txfoundation.dll', Symbols loaded.
'test44.exe': Loaded 'Z:\dll\bin\utilities_c.dll', Symbols loaded.
'test44.exe': Loaded 'C:\WINDOWS\SYSTEM32\mscoree.dll', No symbols loaded.
....
'test44.exe': Loaded
'C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\msco rwks.dll', No symbols
loaded.
'test44.exe': Loaded
'C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\msvc r71.dll', Symbols loaded.
'test44.exe': Loaded
'C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\fusi on.dll', No symbols
loaded.
'test44.exe': Loaded
'C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\msco rlib.dll', No symbols
loaded.
First-chance exception at 0x00000000 in test44.exe: 0xC0000005: Access
violation reading location 0x00000000.
First-chance exception at 0x791b970e in test44.exe: 0xC0000005: Access
violation reading location 0x000001a6.
The thread 'Win32 Thread' (0x4d0) has exited with code -2146233082
(0x80131506).
The thread 'Win32 Thread' (0x69c) has exited with code -2146233082
(0x80131506).
The program '[2668] test44.exe: Native' has exited with code -2146233082
(0x80131506).