A stimulus DLL can manage a conversation between two partners when the partners are responding immediately to events or when one or both partners are holding events for later processing. A stimulus DLL may optionally export an entry point, which ESL will use to notify the DLL immediately before and after ESL processes an event.
The entry point must be exported by the name EslEvent. If this subroutine has been defined by a stimulus library, ESL will call it immediately before invoking a stimulus and once again immediately after any responses to a stimulus have taken place. The entry point must be an APIENTRY function returning type "void" (that is, no return value). EslEvent takes four arguments:
Argument |
Use |
Window handle |
Passing stimulus events |
unsigned short |
Eventnumber that ESL uses to perform event matching |
WPARAM |
event parameter for event parameter matching |
short integer |
0 - no response to the event 1 - response to the event has just completed 2 - response to the event is about to be invoked |
The DLL may perform internal processing when this function is called by ESL.
VOID APIENTRY EslEvent(HWND hwnd, USHORT eventnumber, WPARAM eventparameter, SHORT flag)
{
if (flag == 2 && count < 3)
{
count++;
PostMessage (hStimWnd, WM_USER + count,(WPARAM) 1,
(LONG) 0);
}
}