COM DCOM Question:

How to create an instance of the object in COM?

Tweet Share WhatsApp

Answer:

To create the instance of COM componet use the following
WIN32 APIs
To access the component that was there in local system use
following API
CoCreateInstance(clsid,NULL(used for
aggregation),CLSCTX_ALL,Interface_GUID,(void**)
&pRequestedInterface );

To access the COM componet remotely use the following API
CoCreateInstanceEx
(CLSID,NULL,CLSCTX_ALL,COSERVERINFO,Interface_GUID,MULTI_QI*
);

Download COM DCOM PDF Read All 25 COM DCOM Questions
Previous QuestionNext Question
What happens when client calls CoCreateInstance?What is the difference, if any, between OLE and COM?