GDPlugin Help -- SendEventToOne()


Navigation:

 

Use this method to send an event to only one of the installed plugins.  Here is the format:

function SendEventToOne(const PluginIndex : Integer; const EventCode : LongWord; const Int : Integer; Params : Pointer) : Pointer;

PluginIndex is the index of the plugin you wish to send this event to.  For more information on the differences between PluginIndex and Plugin ID, click here.

EventCode is the user-defined event id number.  The EventCodes should be defined in PluginHeader.pas, which is then used by both the application and the plugin.

Int is where the PluginID would normally be sent, but since you are sending from the application, it is not necessary, and can be used to send more information to the plugin.

Params is a pointer to allow for complete flexibility.  You can simply pass an integer typecasted as a pointer (ex Pointer( 10 ) ), or you can send a PChar, or you can send a pointer to a data structure (record) containing additional information.

The result pointer is available so that you can use an event like a function ( To get an immediate value, instead of by sending an event back ) if need be.  This is assigned to the Result in the plugin's EventHandler proc.