Iuknown interface, DOT NET Programming

Describe IUKNOWN interface

All COM object supports atleast one interface, that is  IUnknown interface. All interfaces are the classes, derived from the base class IUnknown. Every interface supports methods access data and perform operations transparently to the programmer. taking example, IUnknown supports 3 methods, AddRef, Release(), & QueryInterface(). Assuming that pinterf is a pointer to an IUnknown. pinterf->AddRef() increments the reference count. pinterf->Release() decrements the reference count, deleting the object when the reference count reaches 0(zero). pinterf->QueryInterface( IDesired,pDesired) checks to watch  if the current interface (IUnknown) supports another interface, IDesired, creates an instance (via a call to CoCreateInstance()) of the object if the reference count is 0 (the object does not yet exist), and then calls pDesired->AddRef() to increment the reference count (where pDesired is a pointer to IDesired) and returns the pointer to the caller.

Posted Date: 9/21/2012 7:26:27 AM | Location : United States







Related Discussions:- Iuknown interface, Assignment Help, Ask Question on Iuknown interface, Get Answer, Expert's Help, Iuknown interface Discussions

Write discussion on Iuknown interface
Your posts are moderated
Related Questions
C# Programming 1. What is .Net Framework? 2. Write short notes on constructors and destructors. 3. Explain boxing and unboxing with examples. 4. What is a mixed mode a

What is the DataContext class and how is it related to LINQ? After you add a LINQ to SQL Classes item to a project and open the O/R Designer, the empty design surface shows an

Web Based Inventory Management System Project Description: I need a build in software which has the subsequent features, if anybody has ready to use web based application, pl

What are basic methods of Data adapter? The three most commonly used methods of Dataadapter are as follows:- 1)Fill :- It Executes the SelectCommand to fill the DataSet ob

Finding the EOQ and TBO - C# Program: Need summer assignment help on c#.

Give a small explanation of all Elements in the diagram. Action State: - This is a type of state that has an internal action and one outgoing event that would do the int

Explain ExpandoObject and DynamicObject classes. The ExpandoObject class refers to a class whose members can be explicitly added and removed at runtime. In other words, the Exp

Your first assignment will require you to develop a record processing system in both ASP and PHP, giving you an opportunity to see two modern web scripting languages in action.

What is the difference between "DataSet" and "DataReader"? The major differences between "DataSet" and "DataReader" are as follows:- 1)The "DataSet" is a disconnected archit

What is the difference between "Web farms" and "Web garden"? The "Web farms" are used to have some redundancy to reduce the failures. It consists of two or more web server of t