Example wanted: InProcess Automation server (Delphi 2.0)

Do anyone have a simple source code example of an inprocess (dll) OLE
Automation server
(especially the project.dpr)?

I can't get this to work, after CreateOLEObject, the server seems to
start (a form from the server is displayed), but when I call a method on
this server I get something similiar to:
"Variant is not an OLE object" (sorry, don't remember the exact words).
I have listed the four magic DLLxxx functions in a exports section in the
dpr, but it still doesn't work.

I have registered the InProcess server manually.

When embedded in an Exe (LocalServer/out of process) everything works
fine (there seems to be a bug in the 'Users Guide' regarding the DPR
though). I'm still chocked about how easy it was to do.