Returning user defined types from DLL

S

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 ?
 
A

Alf P. Steinbach

* 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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top