By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,797 Members | 1,794 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,797 IT Pros & Developers. It's quick & easy.

DLL/stl-container error

P: n/a
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.
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 7 Nov 2003 04:02:54 -0800, ml*@mip.sdu.dk (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
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.