COM DCOM Question:

Download Job Interview Questions and Answers PDF

How to create an instance of the object in COM?

COM DCOM Interview Question
COM DCOM Interview Question

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 Interview Questions And Answers PDF

Previous QuestionNext Question
What happens when client calls CoCreateInstance?What is the difference, if any, between OLE and COM?