I try to run this script in Win32 build without additional conditional defines and access violation happen:
var Response: string;
procedure OnChange(Sender: TObject);
begin
Response := 'Invoke OnChange';
end;
function Execute: string;
var s: TStringList;
begin
s := TStringList.Create;
try
s.OnChange := @OnChange;
s.Add('test');
Result := Response;
finally
s.Free;
end;
end;
The script works fine in Win64 build.
The script work In Win32 build with PS_USECLASSICINVOKE.