How can would you create an instance of the object in COM

Answers were Sorted based on User's Feedback

How can would you create an instance of the object in COM..

Answer / chandrasekharreddy siddamreddy

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

To access the COM componet remotely use the following API

Is This Answer Correct ?    3 Yes 0 No

How can would you create an instance of the object in COM..

Answer / balaji

We can use CreateInstance And CoCreateInstance to create an
instance of the object in COM.

HRESULT CreateInstance(void* pfnCreateInstance,REFIID riid,
void** ppvObj );

[in] A pointer to a creator function.
[in] The IID of the requested interface.
[out] A pointer to the interface pointer identified by
riid. If the object does not support this interface, ppvObj
is set to NULL.
Return Value

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More COM DCOM Interview Questions

What is In-proc?

4 Answers  

C is aggregated by B, which in turn aggregated by A. Our client requested C. What will happen?

2 Answers  

What is the difference, if any, between OLE and COM?

3 Answers  

Explain transaction atomicity?

1 Answers  

What are the purposes of AddRef, Release and QueryInterface functions

2 Answers  

What is a moniker ?

3 Answers  

Explain queued components.

2 Answers  

how you call a dll as a COM dll.

2 Answers  

When you call CoInitialize(NULL) function how it works internally.

8 Answers  

what is mean by scintific,commercial and business applications? How they differ? Please answer me. Advance thanks.

0 Answers   Excel,

how do you know it is general dll or com dll

5 Answers  

Which tool is used to configure the port range and protocols for DCOM communications?

1 Answers