Greetings,
To begin with we have an archetecture which has a manager Asssembly which
loads "Plug-in" assemblies using reflection, when a the UI prompts the
manager.
This loading of the assemblies and initialization is done in a seperate
thread from the UI, to keep the UI from being locked up.
Unfortuately 1 of the plug in assemblies provides a interface to a 3rd party
sdk which is in C++. So the c++\clr assembly wraps the sdk, and seems to
work fine when I test it from a form. The catch with this 3rd party library
is that it requires a window handle upon initialization. So I create a pop
up window from inside the assembly using win32 to create the window. This
works great from testing within a form.
But the problem I run into is that when this plug in is loaded from the
seperate thread (which is a non UI thread), the window becomes non
responsive, and quits working. It won't even paint. After some testing I
found that it is because it was created on a non UI thread.
I was wondering is there a way to get access to the main ui thread to create
this window, or is there some other method I could use to create this pop
window on the main ui thread. Or possibly some other solution?
Thanks for any suggestions!