on 06-15-2017 11:07 AM
Hello, all
I have a large PB classic app, which needs to use a third party .NET assembly, which has wait/async commands in it.
Will it be even possible to use it in PB, since the UI thread would simply block it and I will never get a response?
Thank you
You might want to consider creating a COM wrapper for your .net assembly and then trigger a user event when your sync op is completed. You can then code this event in your Powerbuilder ole object. Make sure that this userevent is exposed. Many years ago I did something similar with MS Outlook - I needed to capture the Send event of a message.
I don't know if PB 2017 will let us consume .net assemblies directly without the need for COM wrappers. Chris P might have a definite answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, Roland
If this is the only option, then it is not very useful. All the calls in the .NET code are "await", i.e., as far as the main flow is concerned they are synchronous. So, there is a flow, which produces result and I need to return them to the PB program. And using Sharedobjects is very problematic for this, because the result are not returned to the main thread.
I guess, I will have to create and launch a WinForm app to use this assembly.
Does anyone know if this issue can be handled differently in the upcoming PB 2017?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could call it from a background thread (SharedObject functions).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.