#1 2020-11-19 09:10:59

radexpol
Member
From: Poland, Krk
Registered: 2019-11-29
Posts: 116

IInterface to guid

Can someone help me how to accomplish the following task. I would like to create the procedure that help me register and retrieve an interface.


procedure TServerAccess.Resolve(intf: IInvokable; out Obj);
begin
  connector.ServiceDefine(intf, sicSingle);--> [dcc32 Error] uServiceBase.pas(90): E2250 There is no overloaded version of 'ServiceDefine' that can be called with these arguments
  connector.Services.Resolve(intf, obj);  -> [dcc32 Error] uServiceBase.pas(91): E2250 There is no overloaded version of 'Resolve' that can be called with these arguments
end;

Offline

#2 2020-11-19 10:27:59

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: IInterface to guid

You are confusing IInterface instance and TGUID parameter type.
You should think into TGUID as being the "class-like" of a IInterface.

Just write:

TServerAccess.Resolve(const intf: TGUID; out Obj);

So you could write:

access.Resolve(ISomething, obj);

Offline

Board footer

Powered by FluxBB