COM DCOM Question:
Download Questions PDF

How to create an instance of the object in COM?

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?