It can work either way. The server can control whether a single instance or multiple instances are used by setting flags when it calls the
CoRegisterClassObject[
^] function. Using
REGCLS_SINGLEUSE
(see
REGCLS[
^]) will results in multiple instances while
REGCLS_MULTIPLEUSE
result in the same instance being reused.
If you're using MFC look at the code in the server's
InitInstance
function. You'll find some which looks like this:
CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(
IDR_MFCEXETYPE,
RUNTIME_CLASS(CMFCExeComServerDoc),
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CMFCExeComServerView));
AddDocTemplate(pDocTemplate);
m_server.ConnectTemplate(clsid, pDocTemplate, FALSE);
Change the underlined bit to
TRUE
and separate instances will be used.