473,473 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

COM object separated from its underlying RCW error

Hi all

I've gotten this error:

Err# 5 COM object that has been separated from its underlying RCW can not be used

I have researched this some, and have discovered that it has something to do with the threading model used by the app

My VB.NET app is using LeadTools COM objects. This error occurs when the form that contains the LeadTools control is first opened, then closed, then the above error consistently appears during the re-opening of the given form

I need some help in order to avoid running into this error

Any assistance would be appreciated

Thanks

Neal
Nov 20 '05 #1
3 11254
Are you running your COM object methods on the separate thread? or
asynchronously compared to the form? do they modify anything in the form?

-CJ
"Neal Miller" <neal @ milsys.com> wrote in message
news:CC**********************************@microsof t.com...
Hi all,

I've gotten this error:

Err# 5 COM object that has been separated from its underlying RCW can not be used.
I have researched this some, and have discovered that it has something to do with the threading model used by the app.
My VB.NET app is using LeadTools COM objects. This error occurs when the form that contains the LeadTools control is first opened, then closed, then
the above error consistently appears during the re-opening of the given
form.
I need some help in order to avoid running into this error.

Any assistance would be appreciated.

Thanks,

Neal

Nov 20 '05 #2
I believe that they are running asynchronously compared to the form, because I did not implement my forms as a multi-threading application.

Based on the MS article titled "Implementing Finalize and Dispose to Clean Up Unmanaged Resources", I want to create and call Finalize and Dispose methods on these forms for the LeadTools COM Objects

Thanks

Neal Miller
Nov 20 '05 #3
Neal,
I normally see that when I call
System.Runtime.InteropServices.Marshal.ReleaseComO bject on an COM variable,
then attempt to call a method of that COM variable.

Remember if you call ReleaseComObject on one variable and that variable
refers to the same instance as a second variable, both variables are
invalidated...

Hope this helps
Jay

"Neal Miller" <neal @ milsys.com> wrote in message
news:CC**********************************@microsof t.com...
Hi all,

I've gotten this error:

Err# 5 COM object that has been separated from its underlying RCW can not be used.
I have researched this some, and have discovered that it has something to do with the threading model used by the app.
My VB.NET app is using LeadTools COM objects. This error occurs when the form that contains the LeadTools control is first opened, then closed, then
the above error consistently appears during the re-opening of the given
form.
I need some help in order to avoid running into this error.

Any assistance would be appreciated.

Thanks,

Neal

Nov 20 '05 #4

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

Similar topics

0
by: Grant | last post by:
Hi, I have a website, and if more than one person access certain pages at the same time I get the above error. I have read numerous articles on this, but still no idea of how to fix it. ...
5
by: Rahul T. | last post by:
Hello All, I am trying to create a web service. This web service for now, has to use couple of exisiting COM components. I have added them in my .NET project as COM interop. Most of the time...
1
by: Marco Castro | last post by:
I'm getting the error "COM object that has been separated from its underlying RCW can not be used." whenever I run one of my functions too much. It didn't use to this until I moved part of it into...
2
by: Steve | last post by:
(I posted this in the ADO.NET NG, but didn't get any responses) I've started getting this exception since installing vs2005 "COM object that has been separated from its underlying RCW cannot be...
1
by: Gilz | last post by:
Hi I was wondering if anyone could help i have picked this database up from a designer who has now left the company. The code is a couple of years old. On click of a button it open a...
4
by: Michael Maes | last post by:
Hi, On closing our App, we get following 'InvalidComObjectException': "COM object that has been separated from its underlying RCW cannot be used" The App has been upgraded from .Net1.1 to...
0
by: Peter | last post by:
Hi, everybody, Error message is "COM object that has been separated from its underlying RCW can not be used." When I called the codes below. So I traced the error and found it is caused by...
3
by: Eric Mahurin | last post by:
Is there a standard way to get a descriptor object for an arbitrary object attribute - independent of whether it uses the descriptor/ property protocol or not. I want some kind of...
4
by: johnxhc | last post by:
We have a project in .NET 1.1 , some of the .NET methods take COM interface reference pointer as a parameter, somehow we have to call Marshal.ReleaseComObject to release the COM Object, otherwise...
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...
0
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...
0
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,...
0
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...
1
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...
0
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...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.