I'm attempting to use PowerBuilder.RegistedObject.TriggerEvent() method in C# and PowerBuilder 2022. I've tried to do it with the simplest of examples.
I don't have any issues registering the assembly, creating the object and calling methods from the C# object. I also am able to register and unregister the object without any issues. Any time I call the TriggerEvent method in C# though, I get the error -52 - The objectname is not registered.
I've checked and double-checked the object name for spelling errors, and I know it is case sensative (w_testing is what I'm using)
Any suggestions on how I can debug this? Is there a reason it is registered fine in PowerBuilder but not from my C# DLL. When I UnRegister, I don't get errors unless I do something like UnRegister twice, which seems to sort of confirm that the register/unregister is working. Is there somewhere I can look to "see" the registration? Is there a chance the C# DLL is looking in the wrong place for the registered object?
Thanks!
EDIT: I was able to redo my example with .NET Framework 4.8 and the appropriate invoker dll. It worked perfectly. I now suspect it has to do with me probably not having the correct DLLs available for the .NET6 C# DLL.
.
I wonder why, are the appeon programmers having the same problem as listed above? I can find absolutely not one single (easy) working example using .net 6 and calling back to a pb event from there. The thing is, i'm not a specialist in .net and am starting to learn as much as possible to interact c# .net with pb.
asap i will be glad return with simple (not working) example.
regards