0
John Fauss Friday, 7 August 2020 02:20 PM UTC #1

Has your C++ application performed all of the PBNI initialization that appears to be needed in order to be able to access objects and invoke methods in PB through the PB Virtual Machine (PBVM)? I've only dabbled a little in PBNI and I've not attempted anything close to the level of sophistication you are attempting, but a scan of the PBNI documentation indicates that there are several steps your C++ application has to perform in order to be able to interface with PB object classes and methods.

https://docs.appeon.com/pb2019r2/native_interface_programmers_guide_and_reference/ch05s02.html

HTH, John

0
Isidro Reina Monsó Friday, 14 August 2020 06:02 AM UTC #2

For anyone having the same problem that me:

I have found that InvokeObjectFunction() must be inside a scope defined by PushLocalFrame() and PopLocalFrame().

That way it works and HasExceptionThrown()can detect the exception.