Does LocalServer32 EXE COM activation enable an existing process from the same user account or not?

I have a COM server. LocalServer32 EXE starts when the client application calls c_com_ptr :: CreateInstance (using ATL wrappers.)

On Windows 7, when the second client application running under the same user account also calls c_com_ptr :: CreateInstance, the second copy of the EXE is launched under the same user account. I had the impression from a past life that the second client would share the first EXE.

Is the LocalServer32 process common or not? When and when not? Googling for an answer gives me tremendous noise for a signal relationship, and I cannot find an answer.

My CLSID registry key has a LocalServer32 value indicating the path of EXE, ProgID, Programmable (empty line), TypeLib (GUID), and VersionIndependentProgId. I have an AppID key.

I do not want to run the EXE as a service, and I do not mind that the process is not used. I just want to know the rules, so I know what to expect (in Windows Server 2003 and beyond).

EDIT: after Chris's answer below, I looked at calling CoRegisterClassObject on my server. I use ATL and I overloaded MyServer :: RegisterClassObjects to connect to the calling chain to CAtlExeModuleT :: RegisterClassObjects and see that ATL uses CLSCTX_LOCAL_SERVER and REGCLS_MULTIPLEUSE.

Changing this parameter to CLSCTX_LOCAL_SERVER and REGCLS_SINGLEUSE causes the start of several processes depending on the number of COM objects created by the client, as expected.

, REGCLS_MULTIPLEUSE, COM- COM, , COM- , , , COM- , , REGCLS_MULTIPLEUSE.

, Windows? ( .) Windows, , COM REGCLS_MULTIPLEUSE, -, ? ? ( , , COM- Windows, , , Windows.)

, , , REGCLS_MULTIPLEUSE , : EXE- COM-. , COM- - Windows, .

+5
2

COM. SCM , . , EXE- COM-, . , exe COM, , , ( , ):

  • , COM- CoRegisterClassObject SCM, , exe, REGCLS_SINGLEUSE, .
  • , , exe COM- (, , ).
+7

All Articles