Re: Big threading problem
Forms don't exist in any thread. They just exist. Threads are not about data; they are about instructions. Instructions are executed on a specific thread but all those instructions have access to exactly the same data.
You're going to have to explain more clearly your situation because I can't tell whether you're saying that your app is making calls to this COM API or your app is providing this API to COM components.
Re: Big threading problem
OK. I'll try and be a little clearer tyhough to be honest I have been looking at this for so long I am confusing myself.
I have a testbed VB 6.0 application which references my COM component which is a COM callable .net assembly.
One of the COM methods is "Show Form 1()".
My COM callable assembly is part of my .net windows soultion. When building my solution it auto registers the COM bit.
When the VB 6.0 application calls "Show Form 1()" the COM object itself calls a method in my Winap which is supposed to do the work of showing the actual form. This code fires without any problems. I placed a messagebox in this method and it opens fine but it opens in a different thread as it is not modal as far as the winap is concerned.
I cannot for the life of me reference any existing properties in the main application as they are in a different thread.
For example when my winap first loads it sets a bunch of static properties so I can access them anywhere. winapp.Global.Variables.UserSettings["CuirrentUser"] in my winapp will always return "VenerableBede" but when I try this via the COM call it is always NULL.
Man I am even more confused.
If you get this you are a genius.:duck:
Jeez jmcilhinney. I have jsut noticed...over 50,000 posts. WOW. Do you live here ?
Re: Big threading problem
Because I am dealing with 2 different app domains I think I may have to go down the COM+ route which I would prefer to avoid but I can't think of any other way.
This is a nasty one.:mad:
Re: Big threading problem
Isn't the problem that you are actually dealing with two different instances of data? You aren't sharing the same form in your vb6 app and your .net one.
Re: Big threading problem
Quote:
Originally Posted by
Edneeis
Isn't the problem that you are actually dealing with two different instances of data? You aren't sharing the same form in your vb6 app and your .net one.
My thoughts exactly, I dont think this has anything to do with threading. I've never done any COM stuff at all though so I dont think I can help I'm afraid..