HighTechTalks DotNet Forums  

Reference to COM objects in Serviced Component

Dotnet Framework (Component Services) microsoft.public.dotnet.framework.component_services


Discuss Reference to COM objects in Serviced Component in the Dotnet Framework (Component Services) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
vaantha@gmail.com
 
Posts: n/a

Default Reference to COM objects in Serviced Component - 04-02-2007 , 04:05 AM






Hi,

I am trying to build a COM component cache using serviced component.
My serviced class will hold reference to COM objects which will be
made available to clients.

code from the serviced class:

objCOM=CreateObject("blah")

objCOM is returned to Clients and since it is instantiated and
pooled, they dont have to wait.

Problem starts here:

Once the client is finished it calls
Marshal.ReleaseComObject(objFromServicedClass). When another client
requests for the COM object from the serviced class, it returns
objCOM. But when the client starts to work on the underlying COM
object exception "COM object that has been separated from its
underlying RCW can not be used" is thrown.

1. When we passed objCOM to client, are we just passing the RCW?

2. If two clients are working on copies of the same variable (say I
did objCOM1=objCOM) will both be working on the same underlying COM
object?

3. If I wanted to create two copies of the RCW, with two separate
copies of underlying COM object what should I be doing?

Thanks in advance


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.