Inno Setup 中的函数指针

发布于 2024-07-10 08:38:06 字数 99 浏览 4 评论 0原文

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

Are function pointers supported in Inno Setup? I can't find anything in the documentation. I know Delphi/Pascal supports them and as the Inno Setup scripting engine is based on it, I'm hoping it is supported.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

撧情箌佬 2024-07-17 08:38:06

我刚刚做了一些测试,函数指针确实有效。 以下 [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 使用 RemObjects 的 Pascal 脚本引擎。 也许您可以在那里找到更多信息。

I just did a little test and function pointers do work indeed. The following [Code] section compiles and works just fine:

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;

BTW: Inno Setup uses the Pascal Script engine from RemObjects. Maybe you can find some more information there.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文