DLL/stl-container error

M

Morten Lind

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.
 
J

Jack Klein

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 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
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top