COM, STA, apartment, reentrancy, re-entrancy

are you getting cyclic function call graphs in your STA (or multiple STAs) ?
so you’ve probably heard of re-entrancy.

if you’re re-entrancy are due to a COM call waiting on some handles (WaitForSingle/MultipleObject/s), you can replace it with


What this method does is wait for your handles, but also handles new COM calls (through a simple message pump), which is just fantastic.
If you have custom message processing, CoWaitForMultipleHandles will not execute this custom behavior, for more info on that look here: http://blogs.msdn.com/timng/archive/2006/09/06/743795.aspx

One thought on “COM, STA, apartment, reentrancy, re-entrancy

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>