473,805 Members | 2,030 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.
Jul 19 '05 #1
1 2166
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.l earn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

41
3013
by: Allan Bruce | last post by:
Hi there, I am interested to know if there are any C++ programmers who do not use STL. I have been coding in C++ for a year or so now, although only recently have I started a large(ish)-scale project. I do not use any STL, and I was wondering if there are any others out there that program in C++ without using STL? (Just to see if I am being stupid by not using it) Thanks Allan
5
2106
by: Scott Brady Drummonds | last post by:
Hi, everyone, A coworker and I have been pondering a memory allocation problem that we're having with a very large process. Our joint research has led us to the conclusion that we may have to replace the STL allocator. But, before I even attempt something like this, I wanted to ask some questions to this group: 1) We read online that STL caches allocated memory so that containers and their contents that are freed at one point in...
5
4239
by: Khalid | last post by:
II am allocating alot of memory for my problem model which uses stl containers for these pointers, will stl free the memory? by other words what is the semantics of memory ownership in stl? thanks a lot kh
2
1376
by: Steve | last post by:
Just wondering if someone can point me to a good, easy to understand online tutorial on STL functions. All the programming manuals I have predate STL, and I would like to learn more about modern C++ since our school doesn't even bother with it.
8
347
by: Walt L. Williams | last post by:
Greetings I am a CS student. I ran into the term "STL" receintly. What is STL? -- Walt L. Williams
11
2575
by: RR | last post by:
I have Plauger's book on STL and I've found that it's different from the STL I have on a Linux box (libstdc++-2.96-112). In particular, the map::erase(iterator) method I have returns nothing (void), not "iterator". So, does the latest C++ Standards document (INCITS/ISO/IEC 14882-2003) contain the definitive current standard for STL and all its templates? Is that the recommended document to find the correct STL semantics, or is
0
1474
by: Tony Johansson | last post by:
Hello! I have two classes called Handle which is a template class and a class Integer which is not a template class. The Integer class is just a wrapper class for a primitive int with some methods. I don't show the Integer class because it will not add any information to my problem. Main is using some STL function. In main you put in nodes in the STL list and you can display the STL list and other things such as erase some value from...
32
2007
by: Conrad Weyns | last post by:
I have recently gone back to doing some work in c, after years of c++, but I find the lack of templates and in particular the container in the stl to be a huge show stopper. There are math libs, plotting libs, graphic libs etc but I what about some usefull container lib. Any ideas anyone? regards, Conrad Weyns
15
2036
by: Herby | last post by:
This is a follow on from my previous thread about clr/safe and STL.NET http://groups.google.com/group/microsoft.public.dotnet.languages.vc/browse_thread/thread/0eb9b25a83bc02df/b170a89dbc67c332#b170a89dbc67c332 A more specific problem now is migrating the current MFC serialization onto STL serialization? How best to serilize using STL? STL does not seem to directly support the concept of serialization in
20
1839
by: Andrew Roberts | last post by:
Any more info on this? Anyone know when it will be released?
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10609
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10366
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5542
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4323
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.