【问题标题】:Function pointers in Inno SetupInno Setup 中的函数指针
【发布时间】:2008-12-05 01:55:19
【问题描述】:

Inno Setup 是否支持函数指针?我在文档中找不到任何内容。我知道 Delphi/Pascal 支持它们,并且由于 Inno Setup 脚本引擎基于它,我希望它得到支持。

【问题讨论】:

    标签: installation inno-setup pascalscript


    【解决方案1】:

    我只是做了一点测试,函数指针确实有效。以下[Code] 部分可以编译并正常工作:

    type
      TStrProc =  procedure (const AStr: String);
    
    procedure Call(const AProc: TStrProc; const AStr: String);
    begin
      AProc(AStr);
    end;
    
    procedure ShowStr(const AStr: String);
    begin
      MsgBox(AStr, mbInformation, MB_OK);
    end;
    
    function InitializeSetup(): Boolean;
    begin
      Call(@ShowStr, 'Hello World!');
    end;
    

    顺便说一句:Inno Setup 使用 the Pascal Script engine from RemObjects。也许您可以在那里找到更多信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-02
      • 1970-01-01
      • 1970-01-01
      • 2016-05-17
      相关资源
      最近更新 更多