Interface Technology Basics VST 3.7 SDK for developing VST plug-in

Public Member Functions | Static Public Attributes | List of all members
FUnknown Class Referenceabstract
Basic Interfaces

The basic interface of all interfaces. More...

`#include <funknown.h>`

Inheritance diagram for FUnknown:

## Public Member Functions
virtual tresult | queryInterface (const TUID _iid, void **obj)=0
| Query for a pointer to the specified interface. More...
virtual uint32 | addRef ()=0
| Adds a reference and returns the new reference count. More...
virtual uint32 | release ()=0
| Releases a reference and returns the new reference count. More...

## Static Public Attributes
static const FUID | iid

## Detailed Description

The basic interface of all interfaces.

- The FUnknown::queryInterface method is used to retrieve pointers to other interfaces of the object.
- FUnknown::addRef and FUnknown::release manage the lifetime of the object. If no more references exist, the object is destroyed in memory.

Interfaces are identified by 16 byte Globally Unique Identifiers. The SDK provides a class called FUID for this purpose.

howtoClass

## Member Function Documentation

## ◆ queryInterface()

virtual tresult queryInterface | ( | const TUID | _iid,
|  | void ** | obj
| ) |  |
| pure virtual

Query for a pointer to the specified interface.

Returns kResultOk on success or kNoInterface if the object does not implement the interface. The object has to call addRef when returning an interface.

Parameters

  _iid | : (in) 16 Byte interface identifier (-> FUID)
  obj | : (out) On return, *obj points to the requested interface

## ◆ addRef()

virtual uint32 addRef | ( |  | ) |
| pure virtual

Adds a reference and returns the new reference count.

Remarks:
  The initial reference count after creating an object is 1.

## ◆ release()

virtual uint32 release | ( |  | ) |
| pure virtual

Releases a reference and returns the new reference count.

If the reference count reaches zero, the object will be destroyed in memory.

## Member Data Documentation

## ◆ iid

const FUID iid
| static

Empty

Copyright © Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.