PC Review


Reply
Thread Tools Rate Thread

COM object separated from its underlying RCW error

 
 
=?Utf-8?B?TmVhbCBNaWxsZXI=?=
Guest
Posts: n/a
 
      20th Feb 2004
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
 
Reply With Quote
 
 
 
 
CJ Taylor
Guest
Posts: n/a
 
      20th Feb 2004
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:CC6AB361-26CC-4FC0-801D-(E-Mail Removed)...
> 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



 
Reply With Quote
 
=?Utf-8?B?TmVhbCBNaWxsZXI=?=
Guest
Posts: n/a
 
      21st Feb 2004
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
 
Reply With Quote
 
Jay B. Harlow [MVP - Outlook]
Guest
Posts: n/a
 
      24th Feb 2004
Neal,
I normally see that when I call
System.Runtime.InteropServices.Marshal.ReleaseComObject 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:CC6AB361-26CC-4FC0-801D-(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
COM object that has been separated from its underlying RCW can not be used??? Marco Castro Microsoft VB .NET 2 9th Jan 2007 12:57 PM
Error: COM object that has been separated from its underlying RCW can not be used. moondaddy Microsoft Dot NET Framework 1 31st Jan 2006 06:45 AM
COM object separated from its underlying RCW error =?Utf-8?B?R3JhbnQ=?= Microsoft ASP .NET 0 30th Jun 2005 01:33 PM
COM object separated from its underlying RCW error =?Utf-8?B?R3JhbnQ=?= Microsoft Dot NET 0 30th Jun 2005 02:40 AM
COM object that has been separated from its underlying RCW can not be used. Rahul T. Microsoft ASP .NET 3 3rd Dec 2004 12:24 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:24 PM.