-
Notifications
You must be signed in to change notification settings - Fork 13
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
.
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.
YYTKStatus PluginUnload();
This function has no parameters.
The function must return YYTK_OK
if unloading succeeds. In other cases, it returns a matching YYTKStatus
to help with troubleshooting.