Top COM DCOM Interview Questions :: ALLInterview.com http://www.allinterview.com Top COM DCOM Interview Questions en-us Define and explain COM? http://www.allinterview.com/showanswers/18201.html COM (Component Object Model) technology in the Microsoft Windows-family of Operating Systems enables software components to communicate. COM is used by developers to create re-usable software components, link components together to build applicat Do COM keep track of all the object references(Accounting)? http://www.allinterview.com/showanswers/18202.html yes What is In-proc? http://www.allinterview.com/showanswers/16127.html 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 fo What happens when client calls CoCreateInstance? http://www.allinterview.com/showanswers/16125.html - Reads Root\Classes\ProgId for the matching ProgID - Reads Root\Classes\ProgId for the matching CLSID. The CLSID is read from the above step. - From the CLSID key, the server type and image filename is known. - Depending upon the server t Differentiate normal DLL to COM DLL http://www.allinterview.com/showanswers/60886.html A normal DLL can export any function. A COM DLL is the one which exports COM APIs like * DllGetClassObject. * DllRegisterServer. * DllUnregisterServer. * DllCanUnloadNow. What is a moniker ? http://www.allinterview.com/showanswers/16129.html 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. What is IUnknown? What methods are provided by IUnknown? http://www.allinterview.com/showanswers/16121.html Iunknow is the base interface for any com component. it supports three methods addref() release() queryinterface() C is aggregated by B, which in turn aggregated by A. Our client requ http://www.allinterview.com/showanswers/16130.html QueryInterface to A will delegate request to B which, in turn, will delegate request for the interface to C. This pointer will be returned to the client. What are the purposes of AddRef, Release and QueryInterface function http://www.allinterview.com/showanswers/16122.html To bring the lost object identity back to the component thru QueryInterface and manage the life-cycle of the component thru AddRef and Release by reference counting. When you call CoInitialize(NULL) function how it works internally. http://www.allinterview.com/showanswers/60567.html This function is used to initialize a component object model. What is the difference, if any, between OLE and COM? http://www.allinterview.com/showanswers/16126.html COM is a standard and OLE is build upon that standard How can would you create an instance of the object in COM http://www.allinterview.com/showanswers/16124.html 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. What should QueryInterface functions do if requested object was not http://www.allinterview.com/showanswers/16123.html Returns a pointer to the current interface if successful or E_NOINTERFACE otherwise. How to Use structs in COM interfaces when Automation compatibility http://www.allinterview.com/showanswers/16201.html Structs, also known as User Defined Types (UDTs), can be used in Automation- compatible interfaces An Automation- compatible struct may contain only primitive Automation types as its members. Nesting structs is not allowed, but VARIANT is a Which tool is used to configure the port range and protocols for DCO http://www.allinterview.com/showanswers/16112.html use DCOMCONFIG.EXE