Skip to content

Legacy: PmSetExported routine

Archie_UwU edited this page Nov 19, 2023 · 2 revisions

You are reading the documentation of YYToolkit Legacy (v2.x.x) - for documentation on current-gen YYTK, see the Homepage.


Set a function as exported, allowing for it to be called by other plugins.

This function should only be called from the PluginEntry or PluginPreload routines.

Syntax

YYTKStatus PmSetExported(
    PluginAttributes_t* pObjectAttributes,
    const char* szRoutineName,
    void* pfnRoutine
);

Parameters

pObjectAttributes

The attributes of the plugin object to which the function belongs to.

Plugins can get a pointer to this opaque structure via the PmGetPluginAttributes function.

szRoutineName

A unique identifier for the function. Other plugins may only use this identifier to call the function.

This identifier mustn't overlap with exports set-up by other plugins.

pfnRoutine

A pointer to the function which is linked to the szRoutineName identifier.

Plugins that get the export by using the identifier will receive this pointer.

Return Value

The function returns YYTK_OK if the function succeeds and the export is successfully registered.

The function returns YYTK_INVALIDARG if one or more arguments are invalid.

Quick Access

Documentation

Writeups

Clone this wiki locally