But it doesn't mention about COM Local sever
Tri Cuong
Posts
-
Trouble with implement Com Local Server -
Trouble with implement Com Local ServerI'm writing a COM server exe using CLSCTX_LOCAL_SERVER as below. 1. COM Server . Use IDL language to define a interfaceID, classID. . Call CoRegisterClassObject to register a factory object . I designed COM Server source code as below class CMyFactory : public IClassFactory { }; class CMyObj : public IUnknown { -----class XSubClass : public IMyInterface -----{ -----}m_subClass; -----friend class CMyObj; } Before starting COM Server, I call CoRegisterClassObject to register factoryObject to system. 2. COM Client . IMyInterface* pObj; . CoGetClassObject(CLSID_CoMyObj, CLSCTX_LOCAL_SERVER, NULL, IID_IClassFactory, (void **) &pFac); . pFac->CreateInstance(NULL,IID_interfaceID,(void**)&pObj); However, the result of CreateInstance calling is "E_NOINTERFACE No such interface supported". Could you please tell me the way to solve it?