IUnknown Interface

IUnknown supports the capability of getting to other interfaces on the same object through QueryInterface. In addition, it supports the management of the existence of the interface instance though AddRef and Release. The following is the definition of IUnknown using the IDL notation; for details on the syntax of IDL see Chapter 15.6.


[
  object,
  uuid(00000000-0000-0000-C000-000000000046),
  pointer_default(unique)
] 
interface IUnknown 
{
   HRESULT   QueryInterface([in] REFIID iid, [out] void **ppv) ;
   ULONG      AddRef(void) ;
   ULONG         Release(void);
}