1)Base interface of COM. Every interface directly or indirectly derived from this interface
2)Provides three methods AddRef, QueryInterface, Release
3)AddRef increments the reference count to the object
4)Release decrements the reference count to the object
5)QueryInterface obtains Pointer to the object.
6)QueryInterface returns E_NOINTERFACE if requested object was not found and also nullify its out parameter.
1)exposes objects, methods and properties to programming tools and other applications that support Automation.
2)The object's properties and methods can be accessed using IDispatch::GetIDsOfNames and IDispatch::Invoke.
CoCreateInstance and CoCreateInstanceEX
1)CocreateInstance is used to create object in local system and it allows only one object to create at a time.
2)CoCreateInstanceEx is used to create object in remote system and it allows to create multiple objects based on single CLSID
1)Is the mechanism in which outerobject exposes the methods of inner object
2)We can get a pointer to the inner interface, calling QueryInterface of the outer object with IID of the inner interface.
1)An object that implements IMoniker interface.
2)provides information to uniquely identify a COM object.
OLE vs COM
1)OLE is build on top of COM
2)COM is a specification, while OLE is a particular implementation of this specification
COM vs DCOM
1)introduced several improvements for distributed environment, such as MULTI_QI (multiple QueryInterface()), security
2)DCOM demonstrated importance of surrogate process (you cannot run in-proc server on a remote machine).
3)DCOM introduced a load balancing
4)DCOM extends COM
1) which supports both IDISPATCH and V-Table based interfaces
2)You may have two dual interfaces in one class. you cannot work with two dual interfaces at the same time.
Marshalling By Value
1) Instead of accessing an object remotely, it is possible to copy the static state of the object and create a new object with the same state information on the caller side.
2) not involve network round trips.
multi-threaded apartment (MTA) and Single-threaded apartment (STA)
1) In STA, all calls will be made by the same thread. In MTA, COM object can be accessed by many threads simultaneously
2) A process can have only one MTA, but many STAs
In-Proc means COM object that implemented as DLL and supposed to be hosted by a container. When you have to instantiate the in-proc object remotely, you may use DLLHost.exe application that was design specially for this purpose.
Interface Definition Language to describe COM interfaces
Is there a way to register in-proc server without regsvr32.exe?
Yes. Call DllRegisterServer() from the client. Do not forget to call DLLUnregisterServer() from the same client. You may also use Registrar object for the same purpose or use direct manipulation of the windows registry.