Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delphi 10.4 Could not call proc property type Variant #249

Open
bamsey2k1 opened this issue May 25, 2021 · 4 comments
Open

Delphi 10.4 Could not call proc property type Variant #249

bamsey2k1 opened this issue May 25, 2021 · 4 comments

Comments

@bamsey2k1
Copy link

property like:
RegisterProperty('Rec', 'Variant string', TPSPropType.iptRW);

compiled in XE7 working fine but compiled in 10.4 gives "Could not call proc"

@pjrobin
Copy link
Contributor

pjrobin commented May 31, 2021

Perhaps related to #232 ?

@bamsey2k1
Copy link
Author

Yeah, probably the same issue

@pjrobin
Copy link
Contributor

pjrobin commented Sep 17, 2021

found a fix: in invokeCall.inc function TPSExec.InnerfuseCall, result type variant is not implemented. adding the following code after line 188 fixed the issue:

      btVariant:
      begin
        PVariant(res.dta)^ := Invoke(Address,Args,SysCalConv,TypeInfo(Variant),False,IsConstr).AsVariant;
      end;

@bamsey2k1
Copy link
Author

bamsey2k1 commented Sep 17, 2021

Great news, it works! But you have add following code after line 67:

btVariant: Arg := TValue.From(PVariant(fvar.dta)^);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants