473,545 Members | 2,679 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create a window on a non UI thread within a C++\Clr?

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!
Jul 31 '08 #1
0 1349

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3052
by: Christopher D. Wiederspan | last post by:
I've got a WebServices application that uses Crystal Reports to produce and then export Invoices to PDF format. Without getting into too many details, it's just a big loop statement that goes out to SQL using a SqlDataAdapter, brings back a dataset which is pushed into the Crystal Report, and the report is exported - nothing fancy. ...
4
6184
by: Daylor | last post by:
in win32 process , when u create new process,u have new main thread. i know,appDomain r logical procces,that exists in 1 win32 process. the q: is there way to create second appDomain (the first 1 is the defualt appDomain) with his new ("main") thread ? if not ,what is the easy and clear way to create new thread on the new appDomain ?
4
5421
by: Matthew Groch | last post by:
Hi all, I've got a server that handles a relatively high number of concurrent transactions (on the magnitude of 1000's per second). Client applications establish socket connections with the server. Data is sent and received over these connections using the asynchronous model. The server is currently in beta testing. Sporadically over the...
2
2014
by: none | last post by:
Hi, I'm opening a popup window with JavaScript. It has a command button. This is from the primary source (opener) window: ################################################################### // ======================================================= function popup01 () { var win_url
6
1418
by: Robert Speck | last post by:
Hi there, Can anyone shed anymore light on why "Thread.Suspend()" has been deprecated by MSFT beyond what MSDN says about it. I'm not sure if I quite appreciate the various pitfalls they discuss but using it under certain circumstances still seems reasonable. For instance, I want to display a small modal dialog with a "Cancel" button which...
2
1712
by: Mukesh | last post by:
Hi all I m Using SQL SERVER 2005 I have a requirement to store some data in xmldatatype using stored procedure , Here is example
3
4690
by: Klaus | last post by:
Hi, I have an existing VC 6 MFC application which communicates asynchronly with a VC 2005 managed code dll. I use an unmanaged base class with virtual functions to access methods in the MFC application. Furthermore, I use a pointer to an unmanaged function to jump back into the managed dll. The managed part is basically a remoting...
1
1616
by: DR | last post by:
what are the memory caps for threads running as a CLR stored procedure executed by sql server 2005? is it limited by OS only or also by sql servers memory limits? e.g. lets say my clr stored procedure is executed by sql server 2005 then it creates 10 threads and each thread builds a giant array on the stack, is the limits of each array limited...
0
1850
by: jeremyje | last post by:
I would like to create an application where I have many concurrent processes being managed by a monitoring process. Each process that is "managed" will be invoked from an assembly dll (think reflection). I want a way to invoke these processes in parallel utilizing multi-core processors but I'd like to have the protection that AppDomains...
0
7428
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7685
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7941
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7452
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7784
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6014
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5354
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5071
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1039
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.