Search code examples
windowsvisual-c++cominteropcom-interop

Can I set up a COM+ application to create "single-use" out-proc servers?


If I write an out-proc COM server myself I can make it "single use" by specifying REGCLS_SINGLEUSE flag in CoRegisterClassObject() call.

How can I achieve the same effect when I create a COM+ application and add an in-proc server there so that COM+ surrogate is used and I don't need to write surrogate code? In other words, how can I make the out-proc COM server created by COM+ "single use"?


Solution

  • I can't say that I've ever tried it, but it looks as though the COM+ Catalog property RecycleActivationLimit of a COM+ Application might do what you want if you set it to 1.