COM Problem: Using within one Interface Methode another Interface as Parameter

Hi,

I would like to do the following:

This is the definition:

[
  uuid(49890CA0-C1C8-11D3-BC83-AA95B431FA15),
  version(1.0),
  helpstring("Dispatch interface for Simple2AutoServer Object"),
  dual,
  oleautomation
]
 interface ISimple2AutoServer: IDispatch
{
  [id(0x00000001)]
  HRESULT _stdcall getString([in] SimpleAutoServer * SimpleAutoServer, [out]
BSTR * str );

Quote
};

This is ther Server code:

STDMETHODIMP TSimple2AutoServerImpl::getString(
  SimpleAutoServerPtr simpleAutoServer, BSTR* str)
{
  WideString _str;

  simpleAutoServer->getString(&_str);

  *str = _str;

  return S_OK;

Quote
}

And this ist the Client Code:

//  if (!SimpleServerObj) {
//    SimpleServerObj = CoSimpleAutoServer::Create();
//  }

  ISimpleAutoServerDisp SimpleServerObj;
  SimpleServerObj.BindDefault();

  SimpleServerObj->setString(WideString(Edit1->Text));

//  if (!Simple2ServerObj) {
//    Simple2ServerObj = CoSimple2AutoServer::Create();
//  }

  ISimple2AutoServerDisp Simple2ServerObj;
  Simple2ServerObj.BindDefault();

  WideString _str;
  Simple2ServerObj->getString(SimpleServerObj, &_str);  // Compiler Error,
Cannot convert ISimpleAutoServerDisp to

// ISimpleAutoServerPtr
  Edit2->Text = _str;

I understand the error but I don't know how to solve this, when I use the
TCOMISimpleAutoServer Class (early-binding) so everything works.

But I need late-Binding or to say it else I need a IDispatch Implementation
because finally the Automation Server has to be
visible from VisualBasic. So how can I have in one Method as Parameter an
Object, well Interface and use it?

For any help I would be very glad.

best regards,

Igor Berchtold