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
What is .NET Framework? .NET Framework is a complete environment that permits developers to develop, run, and deploy the following applications:     Windows services

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

Image Generator (Ngen.exe) The Ngen.exe (Native Image Generator) allows you to run the JIT compiler on your assembly's MSIL and generate native machine code which is cached to

I want to prepare one web based application which have student registration and according to semester and every time it will change as per semester change according, now student ge

Project Description: Specifically i need develop one web based application which have student registration and according to semester and each time it will change as per semester

Types of Transactions in COM + .NET There are 5 types of transactions that can be used with COM+.   An object is whenever registered with the COM+ it has to abide either to any

What is the difference between delegate and events? Actually events use delegates in the bottom. But they also add an extra layer on the delegates, hence forming the publisher

current available topics on computer graphics

CTS(Common Type System) : In order that the two language communicate smoothly CLR has CTS (Common Type System). Example in VB you have "Integer" and in C++ you have "long" these d

write a program in C# to perform arithmetic operation