I need this, because I have around 100 of properties in one interface and I
have to do some error and type checking for each of them. General idea is to
have one procedure SetValue for each basic type of property (String,
Integer). And then I can call SetValue (baseclass.someprop). Or something
like that. I can not perform checking on COM site, because I do some form
based checking too.
Another solution is to somehow persuade delphi to use interface property as
parameter in proc. Something like this:
....
var xxxx: Variant
begin
xxxx := ComObj as ISomeinterface;
xxxx.Prop = 'test'; //this works fine
//but I need something like this
SetValue (xxxx.Prop) or SetValue (xxxx, Prop);
...
...
procedure SetValue (xx:Variant; prop: ??????; value:String);
begin
//some checking
xx.prop = value;
end;
...
Or do I have to use Com Dispatch (Invoke) (Need an example).
Any ideas?
thanks, Matej Spiller