Skip to content

Define event in pascal script fail with access violation in Win32 build #285

@ccy

Description

@ccy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions