IUnknown

IUnknown

In programming, the IUnknown interface is the fundamental interface in the Component Object Model (COM). The published [http://www.microsoft.com/com/resources/comdocs.asp COM specification] mandates that COM objects must minimally implement this interface. Furthermore, every other COM interface must be derived from IUnknown.

Methods

The IUnknown interface exposes three methods (sometimes called functions): QueryInterface, AddRef, and Release: [http://msdn2.microsoft.com/en-us/library/ms680509.aspx IUnknown definition] at [http://microsoft microsoft.com] ; accessed 18-Jan-2008]

* QueryInterface is used to obtain a pointer to another interface, given a GUID that uniquely identifies that interface (commonly known as an interface ID, or IID). If the COM object does not implement that interface, an E_NOINTERFACE error is returned instead.
* AddRef is used by clients to indicate that a COM object is being referenced. This is necessary to ensure that a COM object is not disposed prematurely.
* Release is used by clients to indicate that they have finished using the COM object. An unreferenced COM object may be safely disposed.interface IUnknown{ virtual HRESULT QueryInterface(REFIID riid, void **ppvObject) = 0; virtual ULONG AddRef(void) = 0; virtual ULONG Release(void) = 0;};The IUnknown interface ID is defined as a GUID with the value of {00000000-0000-0000-C000-000000000046}.

Miscellaneous

*Components designed under the ActiveX standard must, at minimal, implement the IUnknown interface. [http://msdn2.microsoft.com/en-us/library/aa751968.aspx ActiveX Controls] at [http://microsoft.com microsoft.com] ; accessed 18-Jan-2008]
*IUnknown serves as the base for Mac OS X's Core Foundation CFPlugIn framework.Fact|date=June 2008

Notes

ee also

* IDispatch


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • IronRuby — Infobox Software name = IronRuby caption = developer = Microsoft Dynamic Language Runtime Team latest release version = latest release date = latest preview version = IronRuby Alpha latest preview date = July 24, 2008 operating system = Cross… …   Wikipedia

  • COM+ — Das Component Object Model [kəmˈpoʊnənt ˈɒbdʒɪkt ˈmɒdl] (Abk. COM) ist eine von Microsoft entwickelte Plattform Technologie, um unter dem Betriebssystem Windows Interprozesskommunikation und dynamische Objekterzeugung zu ermöglichen. COM fähige… …   Deutsch Wikipedia

  • Component Object Model — Das Component Object Model [kəmˈpoʊnənt ˈɒbdʒɪkt ˈmɒdl] (Abk. COM) ist eine von Microsoft entwickelte Plattformtechnik, um unter dem Betriebssystem Windows Interprozesskommunikation und dynamische Objekterzeugung zu ermöglichen. COM fähige… …   Deutsch Wikipedia

  • Globally unique identifier — A globally unique identifier (GUID,  /ˈɡuːɪ …   Wikipedia

  • Globally Unique Identifier — A Globally Unique Identifier or GUID (pronEng|ˈguːɪd or IPA|/ˈgwɪd/) is a special type of identifier used in software applications in order to provide a reference number which is unique in any context (hence, Globally ), for example, in defining… …   Wikipedia

  • Component Object Model — Not to be confused with COM file. Component Object Model (COM) is a binary interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range… …   Wikipedia

  • Universally Unique Identifier — A Universally Unique Identifier (UUID) is an identifier standard used in software construction, standardized by the Open Software Foundation (OSF) as part of the Distributed Computing Environment (DCE). The intent of UUIDs is to enable… …   Wikipedia

  • UUID — Эту страницу предлагается объединить с GUID. Пояснение причин и обсуждение на странице Википедия:К объединению/25 февраля 2012. Обсуждение длится одну неделю (или дольше, если оно идёт медленно). Дата начала обсужде …   Википедия

  • User-Mode Driver Framework — The User Mode Driver Framework is a device driver development platform first introduced with Microsoft s Windows Vista operating system, and is also available for Windows XP. It facilitates the creation of drivers for certain classes of devices.… …   Wikipedia

  • Component Object Model — (COM) es una plataforma de Microsoft para componentes de software introducida por dicha empresa en 1993. Esta plataforma es utilizada para permitir la comunicación entre procesos y la creación dinámica de objetos, en cualquier lenguaje de… …   Wikipedia Español

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”