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
Importance of IT governance Governing and managing information technology is a crucial activity in organizations to generate business value. According to Ross & Weill (2004), f

Can you give an example of what might be best suited to place in the application_Start and Session_Start subroutines? Application Start - We can place code to initialize

Find out the Factorial - C# Program I've been trying so many codes for this but those codes didn't work well. Please write the code for find out the factorial of an integer nu

Determining salvage value of an item - C# Program I am a learner of C# language and i am struggling with the programming functions in c#. Can you have any code examples for th

What is a Class in dot Net? The class describes all the attributes of objects, as well as the methods which implement the behavior of member objects. It is a comprehensive data

Slide Bettween Window Application 1 Project Description: Like Mouse Gesture. Keep Right Mouse, Slide Left and drop right mouse. Move to earlier app on taskbar. Keep Lef

NopCommerce v3.10 - Content Page Creation, Product Import and Site Customization Project Description: I have an existing website with about 800 products and we could like to

Web Developer Project Description: We are in need of an expert web developer for long term connection; please apply with samples if you have the subsequent skills: ASP.NET

How can we perform transactions in .NET? The common sequence of steps that would be performed for developing a transactional application is as follows: 1)In the first step o

Explain assemblies An assembly is a single deployable unit that having all the information about the implementation of : - classes - structures and - interfaces An