Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Returning user defined types from DLL

Reply
Thread Tools

Returning user defined types from DLL

 
 
Shlomy Shivek
Guest
Posts: n/a
 
      10-19-2006
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 ?

 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      10-19-2006
* Shlomy Shivek:
> 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?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
User-defined exception: "global name 'TestRunError' is not defined" jmike@alum.mit.edu Python 1 07-10-2008 12:37 PM
#if (defined(__STDC__) && !defined(NO_PROTOTYPE)) || defined(__cplusplus) Oodini C Programming 1 09-27-2005 07:58 PM
User Defined function returning table give inconsistent results Marc Walgren ASP General 3 08-23-2004 04:02 PM
Returning user-defined objects from a web method Rafael Corchuelo ASP .Net Web Services 0 03-06-2004 03:09 PM
msvcrt.dll, msvcirt.dll, msvcrt20.dll and msvcrt40.dll, explanation please! Snoopy NZ Computing 16 08-25-2003 12:34 PM



Advertisments