Get a Blob Image from OleAutomation Server

* My Problem:
Pass an blob image between a ClientDataSet (in Server Side) to another
ClientDataSet (in Client Side), not using IAppServer, but my own interface
in a Ole Automation Server (not RemoteDataModule).

Here is my scenario:

* Server:
Ole Automation Server in Delphi 7, with a blank form and a ClientDataSet
linked to Animals.XML from DBDEMOS.

* Interface:

function GetImage: OleVariant; safecall;
procedure SetImage (AImage: OleVariant): safecall;

* Implementation:

procedure TBlobServer.SetImage(AImage: OleVariant);
begin
  MainFrm.ClientDataSet.Edit; {always using the first record as example}
  MainFrm.ClientDataSetBMP.Value:=AImage;
end;

function TBlobServer.GetImage: OleVariant;
begin
 result:=MainFrm.ClientDataSetBMP.asvariant;
end;

* Client:
Blank form with a ClientDataSet (BMP TBlobField), DataSource and DBImage,
and a button, an here is the onclick event code:

var
 obj : IBlobServer; {TLB is in the project}
begin
 ClientDataSet.Edit;
 obj:=CoBlobServer.Create;
 ClientDataSetBMP.Value:=obj.GetBlob;
end;

* Error:
 Stream Read Error

In Delphi 5 this work perfectly, but Delphi 7 no. I think this a change made
in Delphi 6 in a OleVariant structure. Note: I need to use OleVariant, not
variant.

Very thanks for atention and any idea. Sorry for bad english.

Guinther Pauli
Brazil.