473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problems relating to threading

1
Hi all,

I have a problem with threading here.

In my scenario, I need to do a very long operation after opening a file. Because of the long operation, it will cause the program to become "Not Responding" if the user clicks anywhere in the application. This is where my threading comes into place, replacing the troublesome "Not Responding" with a loading message in a form.

However, the problem is that at program load/startup, my program will instantiate objects of different classes before threading, and after the long operation in the threading, I seem not to be able to use those objects instantiated earlier on. What's wrong?

The error is: COM object that has been separated from its underlying RCW cannot be used.

What does this mean? Does anybody know?
Hope I can get some help here! Thanks.

b0ssY
Sep 18 '07 #1
2 1016
Shashi Sadasivan
1,435 Expert 1GB
Hi,
I havent had a play around with threading, but have implemented Asynchronus method invocation.
have a look at this site

I have use asyncronus method invocations a bit, and seem to be pretty stable.

You might want to call these methodws and wait until all the methods haave finished, hopfully this way your objects should be returned correctly!

cheers!
Sep 18 '07 #2
Plater
7,872 Expert 4TB
purely, you are not supposed to use objects created in another thread.
They have designed methods to allow you to do so (as mentioned above).

But if you are only using the object in one thread, make sure it is created in that thread.
Sep 18 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Glen Wolinsky | last post by:
This is my first attempt as asynchronous processing. I have created a small test app as proof of concept, but I am having one proglem. In the example (code listed below), my callback routine has...
4
by: David Mc | last post by:
We recently installed the 1.1 redist of .Net on a new server. Only after installing .Net did I realize that the regional settings of the server had not been localized. The application we have...
0
by: Benoit Martin | last post by:
Hi, I've had my application going back to desktop randomly when executing ShowDialog commands. I posted to this list and was asked to post code but unfortunately I cannot reproduce this problem...
2
by: juky | last post by:
Hi all, I have a loop in the thread checking for a particular service status, whenever the status changes to "stopped" a RaiseEvent is generated by thread and another function runs. At the same...
1
by: mburghdorf | last post by:
I am currently working on a vb.net program that interacts with autocad. The thread processes a building that was created within the program and comes up with a price. I then after the job has been...
2
by: Jeff | last post by:
hey asp.net 2.0 I've placed a LoginStatus control on a master page (so I don't need to have it on every webpage) in my project. When I click on this control to logout, I get this error: A...
1
by: monica73174 | last post by:
I have migrated a vb.net program to vb 2005. I am going nuts trying to fix this. There is a splash screen that fades in and then in the background some sub procedures are taking place. Here...
6
by: rh0dium | last post by:
Hi Experts!! I am trying to get the following little snippet to push my data to the function func(). What I would expect to happen is it to print out the contents of a and loglevel. But it's...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.