ソースを参照

* Add stdcall in case of makestub

michael 5 年 前
コミット
02a759f94d
1 ファイル変更6 行追加6 行削除
  1. 6 6
      packages/rtl/classes.pas

+ 6 - 6
packages/rtl/classes.pas

@@ -216,10 +216,10 @@ type
   private
   private
     FOwnerInterface: IInterface;
     FOwnerInterface: IInterface;
   protected
   protected
-    function _AddRef: Integer;
-    function _Release: Integer;
+    function _AddRef: Integer; {$IFDEF MAKESTUB}stdcall;{$ENDIF}
+    function _Release: Integer; {$IFDEF MAKESTUB}stdcall;{$ENDIF}
   public
   public
-    function QueryInterface(const IID: TGUID; out Obj): HRESULT; virtual;
+    function QueryInterface(const IID: TGUID; out Obj): HRESULT; virtual;{$IFDEF MAKESTUB} stdcall;{$ENDIF}
     procedure AfterConstruction; override;
     procedure AfterConstruction; override;
   end;
   end;
 
 
@@ -591,15 +591,15 @@ type
     procedure ValidateContainer(AComponent: TComponent); virtual;
     procedure ValidateContainer(AComponent: TComponent); virtual;
     procedure ValidateInsert(AComponent: TComponent); virtual;
     procedure ValidateInsert(AComponent: TComponent); virtual;
   protected
   protected
-    function _AddRef: Integer;
-    function _Release: Integer;
+    function _AddRef: Integer; {$IFDEF MAKESTUB}stdcall;{$ENDIF}
+    function _Release: Integer;  {$IFDEF MAKESTUB}stdcall;{$ENDIF}
   public
   public
     constructor Create(AOwner: TComponent); virtual; reintroduce;
     constructor Create(AOwner: TComponent); virtual; reintroduce;
     destructor Destroy; override;
     destructor Destroy; override;
     procedure BeforeDestruction; override;
     procedure BeforeDestruction; override;
     procedure DestroyComponents;
     procedure DestroyComponents;
     procedure Destroying;
     procedure Destroying;
-    function QueryInterface(const IID: TGUID; out Obj): HRESULT; virtual;
+    function QueryInterface(const IID: TGUID; out Obj): HRESULT; virtual;  {$IFDEF MAKESTUB} stdcall;{$ENDIF}
     procedure WriteState(Writer: TWriter); virtual;
     procedure WriteState(Writer: TWriter); virtual;
 //    function ExecuteAction(Action: TBasicAction): Boolean; virtual;
 //    function ExecuteAction(Action: TBasicAction): Boolean; virtual;
     function FindComponent(const AName: string): TComponent;
     function FindComponent(const AName: string): TComponent;