How can would you create an instance of the object in COM
Answers were Sorted based on User's Feedback
Answer / chandrasekharreddy siddamreddy
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*
);
Is This Answer Correct ? | 3 Yes | 0 No |
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 );
Parameters
pfnCreateInstance
[in] A pointer to a creator function.
riid
[in] The IID of the requested interface.
ppvObj
[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 |
Can I use com components from .net programs?
What kind of components can be used as DCOM servers?
Does .net replace com?
What is a moniker ?
Suppose we have object B and aggregated object C (in- proc server), created by B. Can you access any interface of B from C?
what is mean by scintific,commercial and business applications? How they differ? Please answer me. Advance thanks.
Can you explain what is dcom?
Which tool is used to configure the port range and protocols for DCOM communications?
Explain transaction atomicity?
how do you know it is general dll or com dll
how you call a dll as a COM dll.
Explain object pooling?