COM/DCOM Programming:

66 Exam and interview questions on COM/DCOM/ActiveX for developers/learners. Click on the link to get the detailed explanations. One you visit any answer you can navigate through next and previous link to jump from one answer to another. You can also select index to come back to this index page. Please provide us the rating and feedbacks of our questions and answers.

answer What is Object Linking and Embedding?

answer What is Component Object Model?

answer What are the advantages of using COM object over using C++ exported class?

answer What are the advantages of interface based programming?

answer What is Interface Definition Language or IDL?

answer What is Object Definition Language?

answer How can I define a Interface?

answer What is the base class of all COM class? Define its prototype.

answer What is the utility of QueryInterface() function in IUnknown interface?

answer What is the utility of AddRef() and Release() function?

answer Does AddRef() is called by client?

answer Who allocates memory for a COM object and where its construction get called?

answer What is HRESULT? Why all function is COM returns HRESULT? How do we come to know the function returns a success or failure? If failure what is the reson behind? How function returns a logical value?

answer What is a wrapper class?

answer How can I implement a wrapper class?

answer What is BSTR? How it differs from an array of unicode wchar_t?

answer What is a factory class?

answer What is the definition of a IClassFactory interface?

answer What is the utility of CreateInstance() function in IClassFactory?

answer What is the utility of LockServer()?

answer What are the entry and exit point routine of COM DLL module?

answer How a COM DLL can provide self-registration and deregistration?

answer What is CLSID, GUID, UUID, APPID ? How it is determined?

answer What is InProc (In Process) and Out-Of-Process COM server?

answer Write steps to create a com client?

answer How do I define a method in an interface using IDL?

answer What is the difference between a COM server written solely in C++ (no IDL) and using C++ and IDL?

answer What are the output of MIDL compilation of an IDL file?

answer What is proxy/stub skeleton in COM client and server programming?

answer How can I add some help/guide line string in the definition of a method to help client to understand the functionality of the method?

answer What is [in], [out], [in,out] and [out,retval] parameters?

answer Why out parameters are always pointer to pointer?

answer Who frees OUT parameters?

answer How BSTRs are allocated and deallocated?

answer How can I convert ASCII string to BSTR using ATL framework and Win32 APIs?

answer What is a co-class in a COM server?

answer What is smart pointer? What is the advantages of using it? How can I generate smart pointer classes from a COM server? What are the file names smart pointers are defined and where those are implemented?

answer What is Marshalling in COM?

answer What is TypeLibrary?

answer How can I write an Interface that supports type info?

answer What is the definition of IDispatch?

answer How IDispatch supports VB, JAVA, script enabled object?

answer What is ID binding? What is the utility of GetIDsofName() function in IDispatch()?

answer How Invoke() method is called using Automation?

answer What is Automation in COM?

answer How to call C++ ATL server from VBA, VB, VB Script, Java Script?

answer What is variant in Automation?

answer How arrays are implemented in COM/Automation?

answer How SAFE ARRAY differs from normal array?

answer How enum types are supported in COM?

answer What is a callback function in COM?

answer How callback function are implemented in COM?

answer What is connectable object in COM? How to implement callback event using connection point and what is the advantage?

answer What is a Sink object in COM?

answer What is an COM Apartment?

answer What is Single Threaded Apartment or STA?

answer What is Multi-Threaded Apartment or MTA? What is the basic difference between MTA enabled and STA com server code?

answer What is an ActiveX object?

answer What is IEnumXXX interface and how it is used?

answer How an array of fixed length data are passed in method?

answer Distinguish between an in-bound and out-bound interface?

answer What is a co-class in IDL? What is a default co-class in VB?

answer What is the difference between a coclass and Interface in IDL?

answer What is the easiest way to register a type library programatically?

answer How a out-of process COM EXE register itself to Service Control Manager(SCM)?

answer What is the meaning of SINGLEUSE, MULTIUSE, MULTI_SEPARATE, SUSPENDED, SURROGATE in COM Exe?

answer What is COM aggrigation?

Topic Discussed: OLE, COM, C++ exported class, interface based programming, IDL, ODL, COM class, QueryInterface(), AddRef() and Release() function? HRESULT, wrapper class, BSTR, factory class, IClassFactory, CreateInstance(), LockServer(), entry and exit point, self-registration and unregistration, CLSID, GUID, UUID, APPID, InProc (In Process) and Out-Of-Process, proxy/stub scheleton, help/guide line string, [in], [out], [in,out] and [out,retval], co-class, smart pointer, Marshalling, TypeLibrary, IUnknown, IDispatch, GetIDsofName(), Invoke(), Automation, SAFE ARRAY, enum types, callback, connectable object, Sink object, Apartment, STA, MTA, Single and Multi-Threaded Apartment, ActiveX, IEnumXXX, in-bound and out-bound interface, out-of process, SINGLEUSE, MULTIUSE, MULTI_SEPARATE, SUSPENDED, SURROGATE, COM aggrigation.