managed and native craziness

Discussion in 'C++' started by Mike Kamzyuk, Apr 26, 2005.

  1. Mike Kamzyuk

    Mike Kamzyuk Guest

    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?
     
    Mike Kamzyuk, Apr 26, 2005
    #1
    1. Advertising

  2. 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
     
    Victor Bazarov, Apr 26, 2005
    #2
    1. Advertising

  3. Mike Kamzyuk

    Mike Kamzyuk Guest

    Thanks, you've been very helpful.
     
    Mike Kamzyuk, Apr 26, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dougloj

    Static Variables and Craziness

    dougloj, Jan 5, 2007, in forum: ASP .Net
    Replies:
    5
    Views:
    404
    dougloj
    Jan 6, 2007
  2. draskin
    Replies:
    0
    Views:
    326
    draskin
    Jan 9, 2007
  3. Dave Burns
    Replies:
    2
    Views:
    673
    Dave Burns
    Jan 12, 2007
  4. Dave Burns
    Replies:
    0
    Views:
    414
    Dave Burns
    Jan 12, 2007
  5. Sideswipe

    Delegation and generics craziness

    Sideswipe, Aug 11, 2008, in forum: Java
    Replies:
    9
    Views:
    405
    Daniel Pitts
    Oct 4, 2008
Loading...

Share This Page