在Inno Setup的函数指针
-
19-08-2019 - |
题
在创新安装是否支持函数指针?我不能找到文档中任何事情。我知道德尔福/ Pascal支持他们,并为Inno Setup的脚本引擎是基于它,我希望它是支持的。
解决方案
我只是做了一个小测试和函数指针确实工作。下面[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;
顺便说一句:创新安装使用的Pascal脚本引擎从中的RemObjects。也许你可以在那里找到一些信息。
不隶属于 StackOverflow