9 Apr, 2007
VB Interview Questions
- How can you guarantee that only remote server is ever created by a client? Create an object (call CoCreateObjectEx()) with CLSCTX_REMOTE_SERVER flag.
- What is __declspec(novtable)? Why would you need this? __declspec(novtable) is a Microsoft’s compiler optimization. The main idea of this optimization is to strip the vtable initialization code from abstract class (for abstract class the vtable is empty, while it is initialized in contructor) MSDN has an article on this topic.
- What is an IDL? IDL stands for Interface Definition Language. IDL is the language to describe COM interfaces.
- What is In-proc? In-proc is in-process COM object, i.e. 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.
- What is OLE? OLE is an object and embedding first implementation of COM spec available from MS before COM was officially named COM.
- Give examples of OLE usage. The most famous examples are probably drag and drop and structured storage implementations.
- What are 2 storage types for composite document? Storage and Stream.
- Is .doc document a compound document? Is it a structured storage? Compound document is a document that contains information about other documents hosted in this document. All office documents _may_ be compound documents, but may be not. Word documents from version 6.0 and up are stored as structured storage.