Skip to main content
Skip table of contents

The plugin entry point: PLUGIN

This page applies to Harlequin v13.1r0 and later; and to Harlequin MultiRIP but not Harlequin Core

The entry point to the plugin must be a function called PLUGIN . It should also be the first function in the plugin binary (if your target platform requires it). You should make sure this is the case when compiling and linking your plugin code.

The entry point for output plugins is typically defined like this:

TEXT
    OSErr PLUGIN ( short selector,
                  deviceDefinition *dev, void *param )
    {
    }

and for input plugins, like this:

TEXT
    OSErr PLUGIN ( short selector,
                  GenericPluginContext * context; void * param )
    {
    }

The type OSErr is defined in the kit header files.

The difference between these two definitions of PLUGIN is in the second argument. The second argument is a pointer to a data structure representing the device that the plugin implements. Output devices are represented by a deviceDefinition structure (see The deviceDefinition structure ), while input devices are represented by a GenericPluginContext structure (see The GenericPluginContext structure ).

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.