InjectEvent2 function (automation interface)
Syntax:
InjectEvent2(<handle to listener.dll>,<instance id>,"<class id>","<event name>")
Where:
• <handle to listener dll> is a numeric value that specifies the handle to the listener.dll, which is returned by the CreateStateMachine and GetStateMachineHandle functions.
• <instance id> is a numeric value that specifies the instance id of the state machine to which you want to inject the event. The first instance is 1, second instance is 2, etc.
• <class id> is a string value that specifies the id of the class that owns the state machine to which you want to inject the event.
• <event name> is a string value that specifies the name of the Event you want to inject.
This function injects an event into a specific instance of a state machine and returns a Boolean value to indicate success or failure.
The InjectEvent2 function replaces the InjectEvent function, which cannot work with different instances of a state machine.
|
If the event requires parameters, you must specify values for these through the SetParameterCount and SetParameter functions.
|
Examples
InjectEvent2 (57980432,1,"faa6c735-c46a-4c11-aa2f-3632ccc79d39","Stop")