சனி, 20 பிப்ரவரி, 2010

1) Explain COM?

1) Explain COM?
 component object module is com.It defines standard binary
 interface between object modules.this interface defines the
 function calling methodology standardised structure.
 
        COM is used by developers to create re-usable software components.
 
2) What is Moniker?
 
An object that implements the IMoniker interface. A moniker 
acts as a name that uniquely identifies a COM object. In 
the same way that a path identifies a file in the file 
system, a moniker identifies a COM object in the directory 
namespace.
 
3)What is In – proc?
 
In-proc server is a COM component, when instance is the 
server is loaded into the caller process space. In-Proc 
server can be easily identified by .dll extension.
 
Out-of-Proc server is a COM component that run in its own 
process space and for any instances created by the users, a 
proxy is created within the users process space. Proxy is 
responsible for interacting with the server to carry out 
operation on behalf of the client. (.exe extension).
 
There are two kind of components: in-process and out-of-
process. This is identified by where the component runs 
when it is invoked. That is, (i) if a component sits inside 
the calling process's address space, it is an in-process 
component and (ii) if a component runs in its own address 
space when invoked, it is an out-of-process component.
The data transmission between out-of-process component and 
the calling process must be carried out by some IPC 
mechanism while it is not required for the other one.
 

4) What is IUnknown? What methods are provided by IUnknown?

Iunknow is the base interface for any com component.
it supports three methods
addref()
release()
queryinterface()
 
5) What is the difference, if any, between OLE and COM?
OLE is a set of technologies to support linking and 
embedding. COM lies in OLE as one of the technologies. COM 
defines a binary standard / set of rules for developing 
reusable components.
 
6) QueryInterface?
Every interface derived from IUnknown, so every interface implementation of Queryinterface. this method queries an object using the IID of the interface to which the caller wants a pointer.

QueryInterface retrieves a pointer to the interface, while also calling AddRef. Otherwise, it returns the E_NOINTERFACE error code.

கருத்துகள் இல்லை:

கருத்துரையிடுக