Questions tagged [rcw]

The common language runtime exposes COM objects through a proxy called the runtime callable wrapper (RCW). Although the RCW appears to be an ordinary object to .NET clients, its primary function is to marshal calls between a .NET client and a COM object.

Runtime Callable Wrapper

The runtime creates exactly one RCW for each COM object, regardless of the number of references that exist on that object. The runtime maintains a single RCW per process for each object. If you create an RCW in one application domain or apartment, and then pass a reference to another application domain or apartment, a proxy to the first object will be used. As the following illustration shows, any number of managed clients can hold a reference to the COM objects that expose INew and INewer interfaces.

http://msdn.microsoft.com/en-us/library/8bwh56xe(v=vs.110).aspx

63 questions
-1
votes
1 answer

Can I force collection for objects of certain type only?

I have a problem with RCWs not being timely collected. I think of periodically force-starting garbage collection from inside code. However I'm not sure if that will have some undesired slowdown. I'm not actually interested in collecting all objects,…
sharptooth
  • 167,383
  • 100
  • 513
  • 979
-2
votes
1 answer

COM RCW - ActiveX Component can't create object

I have one COM component - "ProgramA.dll" This COM component is internally referencing "ProgramB.dll", and creating an instance of underlying object as follow: Public Sub AddData() Dim..... ....... Set objClassA = New…
Nirman
  • 6,715
  • 19
  • 72
  • 139
-3
votes
1 answer

Proper way to Dispose of IDisposable COM Object Wrappers After foreach Loop

foreach loops call .dispose() on objects which implement IDisposable automatically. It's a nice feature, but let's say you had the following function: public COMWrapper GetCOMWrapperByName(string COMWrapperName) { List
Sandy Gifford
  • 7,219
  • 3
  • 35
  • 65
1 2 3 4
5