GDPlugin Help -- OnPluginEvent Event


Navigation:

 

This is the heart of the plugin system.  It is called whenever a plugin sends an event to the application.  This should resemble the plugin's EventHandler function.  Here is the format:

function(const PluginIndex : Integer; const EventCode : LongWord; Params : Pointer) : Pointer of object;

PluginIndex is the index of the Plugin that sent the event.  This is the index, which can differ from the Plugin's SessionID!  The Plugin sends its SessionID, which is converted to the PluginIndex automatically.  The application should only deal with PluginIndex.

EventCode is the number corresponding to the event that was passed by the plugin.

Params is the pointer passed by the plugin.

Result is passed back to the Plugin like a normal function call.  This allows you to either treat this like a function (by assigning a result value) or like an event (by sending an event back).  For examples of both, see the demo source.