Skip to main content
Skip table of contents

Plugin compatibility with more than one version of the interface

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

Plugins compiled for a given version of the RIP might not run, in earlier versions, unless specifically coded for. This is because a plugin trying to set a new field in a structure that did not exist in older versions of the RIP would be setting invalid memory.

A plugin should specify the earliest version of the plugin interface which supplies all the features (selectors and structure fields) that the plugin requires to run. If a later version of the plugin interface provides additional features which the plugin can use, then the code can take advantage of those features.

For example, consider the following original structure definition:

TEXT
      /* plugin interface 16.0 */ typedef aStructure {
        int32 field1;
      } aStructure;

This definition is later modified to be:

TEXT
      /* plugin interface 18.0 */ typedef aStructure {
        int32 field1; int32 field2;
    } aStructure;

A plugin that wants to access field2 , but must still work if it does not exist, could do something like this:

TEXT
    myfield2 = default_value;
      if (pIdentityParam->pluginInterfaceMajorVersion >= 18) myfield2 = astructure->field2;
    ...

See D_GET_IDENTITY for full details of how this should be done.

JavaScript errors detected

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

If this problem persists, please contact our support.