Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is TreatAs a good solution for my situation?

0 views
Skip to first unread message

Alberto Salvati

unread,
Apr 14, 2008, 5:06:49 AM4/14/08
to
Hi All.
I'm a delphi developer and I'm developing a com-based framework.
I've a base server, named "commonserver".
In this server I've 6 com interfaces used by a LOT of com servers in
my framework.
So, each time I change something in my commonserver, I MUST rebuild
all com servers..
Because this task is too long, I'm searching some solution or
workaround.
Searching in sdk, msdn, google and so on, I've found some info about
treatas.
But, I've few details about how treatas works to establish if it's a
solution for me.
My use case is explained below

I've an interface name "ibase" in CommonServer:

IBase = interface(Idipsatch)
[ uuid '{F2196D4F-A67A-4B4E-9BE6-8BBE2575EE7B}',
version 1.0,
helpstring 'Dispatch interface for Base Object',
dual,
oleautomation ]
procedure Copy(Param1: IOrigine) [propput, dispid $0000012D];
safecall;
end;

This interface is used by other interfaces in DIFFERENT com servers:


DerivatedCom1:
IDerivated1 = interface(IBase)
....

DerivatedCom2:
IDerivated2 = interface(IBase)
....


Today, I change base interface:


IBase = interface(Idipsatch)
[ uuid '{F2196D4F-A67A-4B4E-9BE6-8BBE2575EE7B}',
version 1.0,
helpstring 'Dispatch interface for Base Object',
dual,
oleautomation ]
procedure Copy(Param1: IOrigine) [propput, dispid $0000012D];
safecall;
procedure DoSometninh(Param1: word [propput, dispid $0000013D];
safecall;
end;

So, I need to rebuild DerivatedCom1 and DerivatedCom2...
I've a lot com com....

Someone can explain me if, using TreatAs, i can have multiple Ibase
versions and avoid to rebuild all derivated com servers?

Thanks for any answer. Best.

A.Salvati

0 new messages