der code von Get/Set -Link:
Delphi-Quellcode:
procedure TCustomDataModule.SetLink(
const ALink: IInterface);
begin
if Assigned(ALink)
then
begin
if not supports(ALink, IDataChangeLink)
then
raise Exception.Create('
SetLink, Invalid Interface-Type');
if Assigned(FLink)
then
RemoveLink;
ALink.QueryInterface(IDataChangeLink, FLink);
FLink.InstallLink(self);
end;
end;
procedure TCustomDataModule.GetLink(
out Link);
begin
// IDataChangeLink(Link) := FLink;
FLink.QueryInterface(IDataChangeLink, Link);
end;
Edit: FLink ist vom Type IDataChangeLink