Question: I am programming a DLL. I have to return an instance of TBitmap to the host application.
The DLL has another UNIT, wich is a Form, that it has a TImageList for storing images. I wrote a function that I want to return an Image from the TImageList (from the DLL to the host application. How can I do this?

Thanks,
Yulién.

Answer: 
Basically what you need to do is not return an object. In this case you want to return bitmap, why not just return HBitmap handle?
Objects are combinations of code and data. A normal DLL does not support that, because it only supports the C Application Binary Interface (C ABI) but there is a kind of DLLs that does: BPL files. In other words, you need to create a .bpl file and not a .dll file. This requires both that file and the user to be Delphi, of course.