DLL/stl-container error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Morten Lind

    DLL/stl-container error

    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(ve ctor<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 : _CrtIsValidHeap Pointer(pUserDa ta)". (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.
  • Jack Klein

    #2
    Re: DLL/stl-container error

    On 7 Nov 2003 04:02:54 -0800, mlp@mip.sdu.dk (Morten Lind) wrote in
    comp.lang.c++:
    [color=blue]
    > Hello
    >
    > I'm having a problem with some DLL, that I wrote, and a test
    > application using it, which I also wrote.[/color]

    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.l earn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq

    Comment

    Working...