IUnknown

Overview

The standard IUnknown COM interface. This is the base interface of all COM interfaces and is usable from all supported platforms.

Location

  • Reference: Island.fx
  • Namespace: rtl
  • Platforms: Android, iOS, iOS Simulator, macOS, tvOS, tvOS Simulator, Ubuntu, UIKit for Mac, watchOS, watchOS Simulator, WebAssembly

Required Methods


AddRef  stdcall

AddRef is an internal method that's called by the compiler to increase the reference counter of the underlying class that implements this COM interface. This is called automatically. It returns the new reference count, or -1 if the class is not reference counted.

 

method AddRef: UInt32

 

UInt32 AddRef()

 

func AddRef() -> UInt32

 

UInt32 AddRef()

QueryInterface  stdcall

QueryInterface is an internal method that's called by the compiler to ask the COM interface if it supports a given COM interface.

 

method QueryInterface(riid: ^GUID; ppvObject: ^^void): UInt32

 

UInt32 QueryInterface(GUID* riid, void** ppvObject)

 

func QueryInterface(_ riid: UnsafeMutablePointer<GUID>, _ ppvObject: UnsafeMutablePointer<UnsafeMutablePointer<void>>) -> UInt32

 

UInt32 QueryInterface(GUID* riid, void** ppvObject)

Parameters:

  • riid:
  • ppvObject:

Release  stdcall

Release is an internal method that's called by the compiler to decrease the reference counter of the underlying class that implements this COM interface. This is called automatically. It returns the new reference count, or -1 if the class is not reference counted. When the class runs out of references it should be freed.

 

method Release: UInt32

 

UInt32 Release()

 

func Release() -> UInt32

 

UInt32 Release()