managed and native craziness

M

Mike Kamzyuk

Hello. Here's the problem I got.

I have a native c++ dll, say NCD.
I have a mixed c++ dll, say MD. MD depends on NCD. Some functions in
MD return types defined in NCD. Those functions are in __gc classes.
I now want to create a native dll which depends on NCD, and export some
function foo from it.

The problem is that as soon as I try to create an instance of a __gc
class from MD (this is done in foo), I get a FileNotFoundException of
the dll. When those calls are removed, everything works fine. Even
more weird, mscorlib's functions work no problem in foo. The project
compiles and links. What am I missing?
 
V

Victor Bazarov

Mike said:
I have a native c++ dll, say NCD.
I have a mixed c++ dll, say MD. MD depends on NCD. Some functions in
MD return types defined in NCD. Those functions are in __gc classes.
I now want to create a native dll which depends on NCD, and export some
function foo from it.

The problem is that as soon as I try to create an instance of a __gc
class from MD (this is done in foo), I get a FileNotFoundException of
the dll. When those calls are removed, everything works fine. Even
more weird, mscorlib's functions work no problem in foo. The project
compiles and links. What am I missing?

You're probably missing the fact that it all has nothing to do with C++
as a language and everything to do with Microsoft's "extensions" to it.
Please post your Microsoft-specific inquiries to one of 'microsoft.*'
newsgroups. If your ISP doesn't carry them, use 'msnews.microsoft.com'
server, it's free.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top