Win64

2012-01-16 8 views
11

Documentation पर इंटरफ़ेस प्रतिनिधिमंडल बताता है कि इंटरफ़ेस प्रतिनिधिमंडल केवल Win32 के लिए उपलब्ध है। वर्तमान में मैं इसका परीक्षण नहीं कर सकता, क्या यह दस्तावेज बग या इंटरफेस प्रतिनिधिमंडल 64-बिट कंपाइलर में बंद है?Win64

उत्तर

9

यह एक प्रलेखन बग है। Win64 के तहत निम्न बीप:

program Win64delegatedInterfaces; 

{$APPTYPE CONSOLE} 

uses 
    SysUtils; 

type 
    IIntf = interface 
    procedure Foo; 
    end; 

    TMyClass = class(TObject, IIntf) 
    FIntf: IIntf; 
    property Intf: IIntf read FIntf implements IIntf; 
    end; 

    TMyOtherClass = class(TInterfacedObject, IIntf) 
    procedure Foo; 
    end; 

var 
    MyClass: TMyClass; 
    Intf: IIntf; 

procedure TMyOtherClass.Foo; 
begin 
    Beep; 
end; 

begin 
    MyClass := TMyClass.Create; 
    MyClass.FIntf := TMyOtherClass.Create; 
    Intf := MyClass; 
    Intf.Foo; 
end. 
संबंधित मुद्दे