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.
1 ) What is Object Linking and Embedding?
2 ) What is Component Object Model?
3 ) What are the advantages of using COM object over using C++ exported class?
4 ) What are the advantages of interface based programming?
5 ) What is Interface Definition Language or IDL?
6 ) What is Object Definition Language?
7 ) How can I define a Interface?
8 ) What is the base class of all COM class? Define its prototype.
9 ) What is the utility of QueryInterface() function in IUnknown interface?
10 ) What is the utility of AddRef() and Release() function?
11 ) Does AddRef() is called by client?
12 ) Who allocates memory for a COM object and where its construction get called?
13 ) 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?
14 ) What is a wrapper class?
15 ) How can I implement a wrapper class?
16 ) What is BSTR? How it differs from an array of unicode wchar_t?
17 ) What is a factory class?
18 ) What is the definition of a IClassFactory interface?
19 ) What is the utility of CreateInstance() function in IClassFactory?
20 ) What is the utility of LockServer()?
21 ) What are the entry and exit point routine of COM DLL module?
22 ) How a COM DLL can provide self-registration and deregistration?
23 ) What is CLSID, GUID, UUID, APPID ? How it is determined?
24 ) What is InProc (In Process) and Out-Of-Process COM server?
25 ) Write steps to create a com client?
26 ) How do I define a method in an interface using IDL?
27 ) What is the difference between a COM server written solely in C++ (no IDL) and using C++ and IDL?
28 ) What are the output of MIDL compilation of an IDL file?
29 ) What is proxy/stub skeleton in COM client and server programming?
30 ) 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?
31 ) What is [in], [out], [in,out] and [out,retval] parameters?
32 ) Why out parameters are always pointer to pointer?
33 ) Who frees OUT parameters?
34 ) How BSTRs are allocated and deallocated?
35 ) How can I convert ASCII string to BSTR using ATL framework and Win32 APIs?
36 ) What is a co-class in a COM server?
37 ) 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?
38 ) What is Marshalling in COM?
39 ) What is TypeLibrary?
40 ) How can I write an Interface that supports type info?
41 ) What is the definition of IDispatch?
42 ) How IDispatch supports VB, JAVA, script enabled object?
43 ) What is ID binding? What is the utility of GetIDsofName() function in IDispatch()?
44 ) How Invoke() method is called using Automation?
45 ) What is Automation in COM?
46 ) How to call C++ ATL server from VBA, VB, VB Script, Java Script?
47 ) What is variant in Automation?
48 ) How arrays are implemented in COM/Automation?
49 ) How SAFE ARRAY differs from normal array?
50 ) How enum types are supported in COM?
51 ) What is a callback function in COM?
52 ) How callback function are implemented in COM?
53 ) What is connectable object in COM? How to implement callback event using connection point and what is the advantage?
54 ) What is a Sink object in COM?
55 ) What is an COM Apartment?
56 ) What is Single Threaded Apartment or STA?
57 ) What is Multi-Threaded Apartment or MTA? What is the basic difference between MTA enabled and STA com server code?
58 ) What is an ActiveX object?
59 ) What is IEnumXXX interface and how it is used?
60 ) How an array of fixed length data are passed in method?
61 ) Distinguish between an in-bound and out-bound interface?
62 ) What is a co-class in IDL? What is a default co-class in VB?
63 ) What is the difference between a coclass and Interface in IDL?
64 ) What is the easiest way to register a type library programatically?
65 ) How a out-of process COM EXE register itself to Service Control Manager(SCM)?
66 ) What is the meaning of SINGLEUSE, MULTIUSE, MULTI_SEPARATE, SUSPENDED, SURROGATE in COM Exe?
67 ) 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.