Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > managed and native craziness

Reply
Thread Tools

managed and native craziness

 
 
Mike Kamzyuk
Guest
Posts: n/a
 
      04-26-2005
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?

 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      04-26-2005
Mike Kamzyuk wrote:
> 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
 
Reply With Quote
 
 
 
 
Mike Kamzyuk
Guest
Posts: n/a
 
      04-26-2005
Thanks, you've been very helpful.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delegation and generics craziness Sideswipe Java 9 10-04-2008 02:29 AM
Calling from default AppDomain (native code) into another AppDomain (managed code), hosted by ASP.NET Dave Burns ASP .Net 0 01-12-2007 03:43 PM
Calling from default AppDomain (native code) into another AppDomain (managed code), hosted by ASP.NET Dave Burns ASP .Net 2 01-12-2007 03:41 PM
Calliback from native code into managed with asp.net draskin ASP .Net 0 01-09-2007 11:35 PM
Static Variables and Craziness dougloj ASP .Net 5 01-06-2007 06:47 AM



Advertisments