DLL/stl-container error

Discussion in 'C++' started by Morten Lind, Nov 7, 2003.

  1. Morten Lind

    Morten Lind Guest

    Hello

    I'm having a problem with some DLL, that I wrote, and a test
    application using it, which I also wrote.

    In the DLL some class A is defined and exported. I have no problem
    using it in the test application. Also in the DLL there is a class B
    which has a method of the kind

    void B::getSomeAs(vector<A>& aContainer)

    I can call this method on a B-object without problems, and get some
    nice A-objects into a "vector<A> myAs". No problem there.

    The problem arises when destroying the myAs. I get an assertion
    failure saying "Expression: _CrtIsValidHeapPointer(pUserData)". (The
    problem is not solved by returning a vector<A> instead of passing a
    reference.)

    I use Visual Studio VC++ 6.0, and I'm not using MFC in any of the
    projects. All compiler and linker options are set to the same in all
    projects, so it should not be a problem of those sorts.

    This is a big problem for me, and I have no idea what's wrong. Could
    anybody help me out here?

    Thanks,
    Morten Lind.
     
    Morten Lind, Nov 7, 2003
    #1
    1. Advertising

  2. Morten Lind

    Jack Klein Guest

    On 7 Nov 2003 04:02:54 -0800, (Morten Lind) wrote in
    comp.lang.c++:

    > Hello
    >
    > I'm having a problem with some DLL, that I wrote, and a test
    > application using it, which I also wrote.


    Then you will need to ask about it in a Windows programming group, or
    one of Microsoft's support groups in the news:microsoft.pubilc.vc.*
    family. It is not a language issue, C++ does not define or support
    DLLs.

    --
    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
    comp.lang.c++ http://www.parashift.com/c -faq-lite/
    alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c /faq
     
    Jack Klein, Nov 7, 2003
    #2
    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. Anushi
    Replies:
    5
    Views:
    8,778
  2. Maitre Bart
    Replies:
    2
    Views:
    526
    Maitre Bart
    Feb 11, 2004
  3. Replies:
    4
    Views:
    805
    Daniel T.
    Feb 16, 2006
  4. wolverine
    Replies:
    2
    Views:
    454
    Marcus Kwok
    Jul 24, 2006
  5. H. Simpson
    Replies:
    4
    Views:
    284
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page