prjinterfaceimp.pas

来自「DLL导出接口演示」· PAS 代码 · 共 46 行

PAS
46
字号
unit PrjInterfaceImp;



interface

uses
  PrjInterface, Windows;

type
  TMyClass = class(TInterfacedObject, IMyInterface)
  private
  protected
  public
    function MyFunc: WideString; safecall;
  end;

var
  MyClass: TMyClass;

function GetInterface: IMyInterface;
procedure FreeInterface;

implementation

{ TMyClass }

function GetInterface: IMyInterface;
begin
  MyClass := TMyClass.Create();
  result := IMyInterface(MyClass);
end;

procedure FreeInterface;
begin
  //MyClass.Free;
end;

function TMyClass.MyFunc: WideString;
begin
  Result := 'Test Interface<D10.天地弦DKSoft>';
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?