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
Explain keywords with example. Keywords are those words that are reserved to be used for an exact task. These words cannot be used as identifiers. You cannot use a keyword to

What are the different types of replication supported by SQL SERVER? There are 3  types of replication supported by SQL SERVER which are shown below:- 1) Snapshot Replicati

Very, Very Boards does a big business in shirts, especially for groups and teams. They need a project that will calculate the price for individual orders, as well as a summary for

What is aspect oriented programming? The Aspect-oriented software development is the latest technology for the separation of the concerns (SOC) in the software development. The

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

how to replace a keyword using powershell

Assembly: 1) Assembly is a unit of deployment such as EXE or a DLL. 2) An assembly consists one or more files (dlls, exe's, html files etc.),& represents a group of resources,

What is the difference between thread and process? The thread is a path of execution which can run on CPU; a process is a collection of threads that share the same virtual memo

What are the improvements made in CAS in .NET 4.0? The CAS mechanism in .NET is used to control and configure the ability of managed code. Previously, as this policy was applic

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Textilepro.frmLogin.resources" was correctly embedded or linked into assembly