 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Shlomy Shivek Guest
|
Posted: Thu Oct 19, 2006 9:10 am Post subject: Returning user defined types from DLL |
|
|
Hi,
I have an application that uses my DLL.
I want the DLL to return a list type object to the application that
calls it:
list<Type> Proc() {
list<Type> x;
return x;
}
It pass the compliation stage but on runtime it gives me heap error.
Is it possible to do so ? |
|
| Back to top |
|
 |
Alf P. Steinbach Guest
|
Posted: Thu Oct 19, 2006 9:10 am Post subject: Re: Returning user defined types from DLL |
|
|
* Shlomy Shivek:
| Quote: | Hi,
I have an application that uses my DLL.
I want the DLL to return a list type object to the application that
calls it:
list<Type> Proc() {
list<Type> x;
return x;
}
It pass the compliation stage but on runtime it gives me heap error.
Is it possible to do so ?
|
Dynamic libraries are outside the scope of the language definition, and
thus partially off-topic in this group.
The short answer is, however, that you must ensure that memory allocated
by some allocator A is also deallocated by that very same allocator A.
How to accomplish that for DLLs is unfortunately off-topic in this group
(ask in a Windows programming group).
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|