Component sharing?

Hello everybody!

Is it possible to share an object/class instance between main application
and a dll? Whatever approach I try I get some error messages.
Here's a simple example:

I have a TMemo instance on the main form of a calling application. A dll
function should fill this Memo1.Lines property. I pass an address of
Memo1.Lines as a pointer parameter to the dll function like this:

// this code is placed in DLL

type pStringList = ^pStringList;

procedure GetStringList(var List: pStringList);
begin
  List^.Add('some text')
  List^.Add('again some text');
  List^.Add('some more text');
end;

when I call this function from my application like this:

GetStringList(@Memo1.Lines);

The Memo1.Lines gets three more lines as supposed.

But, if I try it like this:

// this code is placed in DLL

type pStringList = ^pStringList;

procedure GetStringList(var List: pStringList);
var MyStringList: TStringList;
begin
  MyStringList := TStringList.Create;
  MyStringList.Add('some text');
  MyStringList.Add('again some text');
  MyStringList.Add('some more text');
  List^.Assign(MyStringList);
end;

I get strange EConvertError exceptions when it comes to assignment. And it
happens every time on whatever class I use.

Real problems arise when I have "big" components that are stored in DLL's
forms, like DBGrids, TreeViews and so. I could pass an address of a target
object as a pointer parameter, and then assign all the properties to the
dereferenced object in dll, but that would eat up much time writing all the
ThisProperty := ThatProperty stuff.

Is there any way that I cann assign an object from DLL to an object in EXE,
and avoid writing thousands of lines of code in DLL's?

Thanks a lot!

Vjekoslav