- Josh Chalmers
- PowerBuilder
- Tuesday, 4 October 2022 06:05 PM UTC
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.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.