mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 14:29:14 +02:00
* TContainedObject 10496. First implementation copied from TInterfacedObject
git-svn-id: trunk@9569 -
This commit is contained in:
parent
78138162a6
commit
eb2a80d272
@ -782,6 +782,19 @@
|
|||||||
Result := IUnknown(fcontroller);
|
Result := IUnknown(fcontroller);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{****************************************************************************
|
||||||
|
TContainedOBJECT
|
||||||
|
****************************************************************************}
|
||||||
|
|
||||||
|
function TContainedObject.QueryInterface(
|
||||||
|
const iid : tguid;out obj) : longint; stdcall;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if getinterface(iid,obj) then
|
||||||
|
result:=0
|
||||||
|
else
|
||||||
|
result:=longint(E_NOINTERFACE);
|
||||||
|
end;
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
Exception Support
|
Exception Support
|
||||||
|
@ -242,6 +242,11 @@
|
|||||||
property Controller : IUnknown read GetController;
|
property Controller : IUnknown read GetController;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TContainedObject = class(TObject)
|
||||||
|
protected
|
||||||
|
function QueryInterface(const iid : tguid;out obj) : longint;virtual; stdcall;
|
||||||
|
end;
|
||||||
|
|
||||||
{ some pointer definitions }
|
{ some pointer definitions }
|
||||||
PUnknown = ^IUnknown;
|
PUnknown = ^IUnknown;
|
||||||
PPUnknown = ^PUnknown;
|
PPUnknown = ^PUnknown;
|
||||||
|
Loading…
Reference in New Issue
Block a user