Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
Can you describe IUKNOWN interface in short
Can you describe IUKNOWN interface in short ?
✍: Guest
Every COM object supports at least one interface, the IUnknown interface. All interfaces are classes derived from the base class IUnknown. Each interface supports methods access data and perform operations transparently to the programmer. For example, IUnknown supports three methods, AddRef, Release(), and QueryInterface(). Suppose 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 zero. pinterf->QueryInterface( IDesired, pDesired) checks to see 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 zero (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.
2007-10-22, 4298👍, 0💬
Popular Posts:
What is page thrashing? Some operating systems (such as UNIX or Windows in enhanced mode) use virtua...
What Is the "@SuiteClasses" Annotation? "@SuiteClasses" is a class annotation defined in JUnit 4.4 i...
What is the difference between include directive & jsp:include action? Difference between includ...
Can you write a program to interchange 2 variables without using the third one? a = 7; b = 2; a = a ...
How To Specify Two Background Images on a Page? - CSS Tutorials - Page Layout and Background Image D...