FAQ Database Discussion Community

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, I only need RCWs collected and they all have System.__ComObject type....

What circumstances other than “await” will allow synchronous code to be interrupted

I recently came across a strange bug in my async code. I was calling a blocking method on a COM control, which appeared to allow my async continuations to run while it was blocking. Consider example code (illustrative purposes only) public async void Main() { //assume some single threaded dispatcher....

Why is the generated wrapper for property type selecting this interface?

When I ask Visual Studio to generate runtime callable wrappers for my COM components, it is selecting a strange type to wrap a certain interface property. This is a summarized type library for component A: // Generated .IDL file (by the OLE/COM Object Viewer) // // typelib filename: prodist.sts.dll [...