Skip to main content
Skip table of contents

D_SELECTOR_SUPPORT (event based plugins)

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


Parameter: int32 * selector

This selector provides a means for the RIP to determine which selectors the plugin supports.

The parameter is a pointer to a selector value. If the plugin implements that selector, it should return NOERR , otherwise ‐1.

This test is part of the provision for keeping older plugins compatible with the RIP: the plugin inter‐ face can be extended, and the RIP will still be able to work out a way to communicate with an older plugin.

Note: Make sure that every selector supported by the plugin will be responded to in your implementation of D_SELECTOR_SUPPORT - even those that any plugin would have to support to be useful. Include D_SELECTOR_SUPPORT itself.

Note: The RIP does not always test for selector support before making a selector call. It sometimes skips the D_SELECTOR_SUPPORT call and goes straight on to calling the selector, analyzing the value returned to determine whether it was supported. It will only do this when there would be no harmful side‐effects if the selector call went ahead.

A convenient implementation is as a switch statement, like this:

    switch(nSelector) { [ ... ]
            switch(*(int32 *)pvParam) {
            /* a case for each supported selector */
                case D_PLUGIN_INITIALISE:
                case D_GEN_SHUTDOWN:
                case D_SECURITY:
                case D_SELECTOR_SUPPORT:
                    nRetVal = NOERR; break;
                    nRetVal = -1; /* not supported */ break;
    return nRetVal;

JavaScript errors detected

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

If this problem persists, please contact our support.