myinterfaceunit.pas

来自「仲裁委仲裁案件计酬程序.有基础资料设置、分级设置」· PAS 代码 · 共 49 行

PAS
49
字号
unit MyInterfaceUnit;

interface
Uses
   MyInterface;

type
  TMyClass = class(TInterfacedObject, IMyInterface)
  private
  protected
  public
        function TransPassword(Const PSW:WideString): WideString; Stdcall;
  end;

var
  MyClass: TMyClass;

function GetInterface: IMyInterface;
procedure FreeInterface;

implementation

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

procedure FreeInterface;
begin
  MyClass.Free;
end;

Function TMyClass.TransPassword(Const PSW:WideString): WideString;
Var
S: String[255];
i:integer;
begin

SetLength(S, Length(PSW));
    for i:=1 to Length(PSW) do
    begin
        S[i] := Char(Byte(PSW[i]) xor (1319 shr 8));
    end;
  Result := S;
end;

end.

⌨️ 快捷键说明

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