Interop exception
-
Hi All, I'm accessing a COM object from my .NET application, but I keep on getting the following exception:
"COM object that has been separated from its underlying RCW can not be used"
Does anyone know how this exception can come about? I'd appreciate any thoughts, thanks. Shehzad -
Hi All, I'm accessing a COM object from my .NET application, but I keep on getting the following exception:
"COM object that has been separated from its underlying RCW can not be used"
Does anyone know how this exception can come about? I'd appreciate any thoughts, thanks. ShehzadHi, - Normally, 'Unmanaged COM' can be called in .NET through RCW(Runtime Callable Wrapper), So the COM which U have used is not supported by the .NET RCW. - May I now the COM Name, Is It Created By U / Not, In which application the COM Created. With Regards, Pandian S
-
Hi All, I'm accessing a COM object from my .NET application, but I keep on getting the following exception:
"COM object that has been separated from its underlying RCW can not be used"
Does anyone know how this exception can come about? I'd appreciate any thoughts, thanks. ShehzadThe only links I can find are referring to ASP.NET, and basically I think it's that the original thread on which an STA object was created has exited, thereby effectively killing the object. When you try to use it the wrapper cannot marshal the object call and generates the exception.
Stability. What an interesting concept. -- Chris Maunder
-
Hi All, I'm accessing a COM object from my .NET application, but I keep on getting the following exception:
"COM object that has been separated from its underlying RCW can not be used"
Does anyone know how this exception can come about? I'd appreciate any thoughts, thanks. ShehzadThanks for your help guys, Sorry S Pandian, I should've been clearer - I am actually able to use the COM object fine, only when I tried accessing it in another thread did I have this problem. Mike, I think you hit the nail on the head! I was creating the object in another thread, and then trying to access it later on, once that thread had exited. But without using another thread, everything works fine. Cheers guys, Shehzad