mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 21:28:21 +02:00
28 lines
377 B
ObjectPascal
28 lines
377 B
ObjectPascal
{$mode delphi}{$H+}{$M+}
|
|
|
|
uses
|
|
Classes, SysUtils,
|
|
typinfo;
|
|
|
|
type
|
|
{ TTest }
|
|
TTest = class
|
|
private
|
|
function GetX: IUnknown ;
|
|
published
|
|
property X: IUnknown read GetX;
|
|
end;
|
|
|
|
function TTest.GetX: IUnknown;
|
|
begin
|
|
Result := TInterfacedPersistent.Create;
|
|
end;
|
|
|
|
var
|
|
V: IUnknown;
|
|
FT: TTest;
|
|
begin
|
|
FT := TTest.Create;
|
|
V := GetInterfaceProp(FT, 'X');
|
|
end.
|