Skip to content

Legacy: PluginUnload 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.


The PluginUnload routine is called exactly once when a plugin is unloaded.

It handles releasing of resources, and removal of callbacks.

The plugin's PluginEntry should set the pointer to this function in PluginObject->PluginUnload. If no routine exists, this pointer is set to nullptr.

Example

YYTKStatus PluginUnload()
{
    // Release buffers.
    // Remove function hooks (the ones not handled by YYToolkit's Core).
    return YYTK_OK; // Successful PluginUnload.
}

This is an example of a PluginUnload function.

Syntax

YYTKStatus PluginUnload();

Parameters

This function has no parameters.

Return Value

The function must return YYTK_OK if unloading succeeds. In other cases, it returns a matching YYTKStatus to help with troubleshooting.

Quick Access

Documentation

Writeups

Clone this wiki locally