This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
How Do You Make A Net Component Talk To A Com Component? |
|
Answer» RCW is used for making a NET compnent talk to a COM component. CCW is used for Com to .NET communication. RCW is used for making a NET compnent talk to a com component. CCW is used for Com to .NET communication. |
|
| 2. |
What Are Queued Components? |
|
Answer» Queued Components, a key feature of COM+ and based on Microsoft MESSAGE Queuing SERVICES (MSMQ), provides an easy way to invoke and execute components asynchronous. Processing can occur without regard to the availability or accessibility of either the sender or receiver. A HOME SHOPPING network is an example of the type of application that might benefit from asynchronous processing. In this asynchronous, disconnected scenario where viewers phone in to several operators, orders are taken en masse and are then queued for later retrieval and processing by the server. Queued Components, a key feature of COM+ and based on Microsoft Message Queuing Services (MSMQ), provides an easy way to invoke and execute components asynchronous. Processing can occur without regard to the availability or accessibility of either the sender or receiver. A home shopping network is an example of the type of application that might benefit from asynchronous processing. In this asynchronous, disconnected scenario where viewers phone in to several operators, orders are taken en masse and are then queued for later retrieval and processing by the server. |
|
| 3. |
C Is Aggregated By B, Which In Turn Aggregated By A. Our Client Requested C. What Will Happen? |
|
Answer» 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. 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. |
|
| 4. |
How Does A Dcom Component Know Where To Instantiate Itself? |
|
Answer» While accessing the DCOM COMPONENT you have to PROVIDE COSERVERINFO STRUCTURE. This structure is having the information about where the component is. While accessing the DCOM component you have to provide COSERVERINFO structure. This structure is having the information about where the component is. |
|
| 5. |
What Kind Of Components Can Be Used As Dcom Servers? |
|
Answer» There are two KIND components: 1. InProc 2. OutProc We can use both as DCOM SERVERS, its upto our DESIGN. There are two kind components: 1. InProc 2. OutProc We can use both as DCOM servers, its upto our design. |
|
| 6. |
What Are The Different Compatibility Types When We Create A Com Component? |
Answer»
|
|
| 7. |
Do Com Keep Track Of All The Object References (accounting)? |
|
Answer» Object references in COM is accounted USING TWO methods of IUnknown INTERFACE (AddRef and Release). AddRef: Increments a reference count WHEREAS "Release" DECREMENTS the count. When the count of the reference is zero the DLL is unloaded from memory. Object references in COM is accounted using two methods of IUnknown Interface (AddRef and Release). AddRef: Increments a reference count whereas "Release" decrements the count. When the count of the reference is zero the DLL is unloaded from memory. |
|
| 8. |
How To Call A Dll As A Com Dll? |
|
Answer» In order to call your DLL as COM dll, you have to follow some RULES to develop the dll. If those rules are there then only your DLL will be called as COM dll. COM is a SPECIFICATION SET of rules to develop BINARIES, COM is not a language. In order to call your DLL as COM dll, you have to follow some rules to develop the dll. If those rules are there then only your DLL will be called as COM dll. COM is a specification set of rules to develop binaries, COM is not a language. |
|
| 9. |
Define And Explain About Com? |
|
Answer» 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 applications, and take advantage of Windows services. 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 applications, and take advantage of Windows services. |
|
| 10. |
Differentiate Normal Dll To Com Dll? |
|
Answer» COM Dll exposes Interface on the contrary to normal DLL that exports functions. Clients create the POINTER to COMDLL's interface to call the methods defined by the COMPONENT that implements the interface. That results in isolation of IMPLEMENTATION and definition of method in the interface. Client doesnt need to RELINK or recompile the CODE if method in the com dll changes as far as the definition of the interface remains same. COM Dll exposes Interface on the contrary to normal DLL that exports functions. Clients create the pointer to COMDLL's interface to call the methods defined by the component that implements the interface. That results in isolation of implementation and definition of method in the interface. Client doesnt need to relink or recompile the code if method in the com dll changes as far as the definition of the interface remains same. |
|
| 11. |
When You Call Co Initialize(null) Function How It Works Internally? |
|
Answer» CoInitialize will initialize the COM library and will move the executing thread to a STA or SINGLE Threaded Apartment Apartment is the LOGICAL entity where threads LIVE. CoInitialize will initialize the COM library and will move the executing thread to a STA or Single Threaded Apartment Apartment is the logical entity where threads live. |
|
| 12. |
Explain Futures Of Com? |
| Answer» | |
| 13. |
How Do You Know It Is General Dll Or Com Dll? |
|
Answer» Open the dll in dependency walker APPLICATION(depends.exe). If the dll is having FOLLOWING FUNCTIONS:
It is a COM DLL OTHERWISE it is not. Open the dll in dependency walker application(depends.exe). If the dll is having following functions: It is a COM DLL otherwise it is not. |
|
| 14. |
Can A Com Interface Be Implemented By More Than One Com Class In The Same Com Component? |
|
Answer» NO. NO. |
|
| 15. |
Which Tool Is Used To Configure The Port Range And Protocols For Dcom Communications? |
|
Answer» USE DCOMCONFIG.EXE use DCOMCONFIG.EXE |
|
| 16. |
What Are The Purposes Of Addref, Release And Queryinterface Functions? |
|
Answer» Query Interface METHOD is used to get the pointer to the interface specified in one of the parameters of this method. Client then USES this pointer to call the method of the component. ADDREF and Release are used to increase and decrease the count of the instance of component LOADED in MEMORY respectively. when the count reaches zero the component is unloaded. Query Interface method is used to get the pointer to the interface specified in one of the parameters of this method. Client then uses this pointer to call the method of the component. AddRef and Release are used to increase and decrease the count of the instance of component loaded in memory respectively. when the count reaches zero the component is unloaded. |
|
| 17. |
What Is Iunknown? What Methods Are Provided By Iunknown? |
|
Answer» IUnknown is a type of COM Interface. Every COM class implements an interface NAMED IUnKnown. IUnKnown contains three methods: IUnknown is a type of COM Interface. Every COM class implements an interface named IUnKnown. IUnKnown contains three methods: |
|
| 18. |
What Should Queryinterface Functions Do If Requested Object Was Not Found? |
|
Answer» RETURNS a pointer to the current interface if SUCCESSFUL or E_NOINTERFACE otherwise. Returns a pointer to the current interface if successful or E_NOINTERFACE otherwise. |
|
| 19. |
What Happens When Client Calls Cocreateinstance? |
Answer»
|
|
| 20. |
How To Create An Instance Of The Object In Com? |
|
Answer» To CREATE the instance of COM componet use the following WIN32 APIs To access the component that was there in local SYSTEM use following API COCREATEINSTANCE(clsid,NULL(used for AGGREGATION),CLSCTX_ALL,Interface_GUID,(void**) &pRequestedInterface ); To access the COM componet remotely use the following API CoCreateInstanceEx (CLSID,NULL,CLSCTX_ALL,COSERVERINFO,Interface_GUID,MULTI_QI* ); To create the instance of COM componet use the following WIN32 APIs To access the component that was there in local system use following API CoCreateInstance(clsid,NULL(used for aggregation),CLSCTX_ALL,Interface_GUID,(void**) &pRequestedInterface ); To access the COM componet remotely use the following API CoCreateInstanceEx (CLSID,NULL,CLSCTX_ALL,COSERVERINFO,Interface_GUID,MULTI_QI* ); |
|
| 21. |
What Is The Difference, If Any, Between Ole And Com? |
|
Answer» OLE is a set of technologies to support LINKING and embedding. COM lies in OLE as one of the technologies. COM defines a binary STANDARD / set of rules for DEVELOPING REUSABLE components. OLE is a set of technologies to support linking and embedding. COM lies in OLE as one of the technologies. COM defines a binary standard / set of rules for developing reusable components. |
|
| 22. |
What Is A Moniker? |
|
Answer» 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. 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. |
|
| 23. |
Suppose We Have Object B And Aggregated Object C (in- Proc Server), Created By B. Can You Access Any Interface Of B From C? What's The Difference Between Aggregated And Contained Objects? |
|
Answer» For the first QUESTION, Yes, we can since the QueryInterface () RULES of thumb suggest that if we can query an interface of C from B, we should be able to query the viceversa.The IUnknown implementation of both the objects has to do the 'magic'. For the second question, Aggregation bounds outer and inner objects together and gives the user the interface pointers of either objects to access it directly so that the user never knows the objects are aggregated. But when containment is used, the interface of inner object never exposed to the client directly rather the outer object receives the calls and forwards internally. Here ALSO, the user doesn't KNOW the objects are contained. For the first question, Yes, we can since the QueryInterface () rules of thumb suggest that if we can query an interface of C from B, we should be able to query the viceversa.The IUnknown implementation of both the objects has to do the 'magic'. For the second question, Aggregation bounds outer and inner objects together and gives the user the interface pointers of either objects to access it directly so that the user never knows the objects are aggregated. But when containment is used, the interface of inner object never exposed to the client directly rather the outer object receives the calls and forwards internally. Here also, the user doesn't know the objects are contained. |
|
| 24. |
What Is In-proc? |
|
Answer» 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 for any instances created by the users, a proxy is created within the users process space. Proxy is responsible for interacting with the server to carry out OPERATION on behalf of the client. (.EXE extension). 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 for any instances created by the users, a proxy is created within the users process space. Proxy is responsible for interacting with the server to carry out operation on behalf of the client. (.exe extension). |
|