C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Returning user defined types from DLL

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Shlomy Shivek
Guest





PostPosted: Thu Oct 19, 2006 9:10 am    Post subject: Returning user defined types from DLL Reply with 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 ?
Back to top
Alf P. Steinbach
Guest





PostPosted: Thu Oct 19, 2006 9:10 am    Post subject: Re: Returning user defined types from DLL Reply with quote



* 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
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.