user2893899
user2893899

Reputation: 113

Can we span separate instance of COM server(exe)

I would like to have multiple test clients, and would like to associate one one com server exe for serving each of test clients.

So far what I can see is in my system there is only one COM server exe running which is serving all my test clients.

Please advice how to achieve this in COM.

Regards Ashish

Upvotes: 1

Views: 133

Answers (1)

MSalters
MSalters

Reputation: 180030

Your first server probably calls CoRegisterClassObject, which means that the second client finds an available class object (using CoGetClassObject, probably via CoCreateInstance).

CoRegisterClassObject has optional REGCLS flags which control reuse. Sounds you want REGCLS_MULTI_SEPARATE.

Upvotes: 3

Related Questions