Callback Functions and Macro Recording 

The SAP Automation GUI Library provides support for a hook function to be called whenever a function from a selected list of GUILib.DLL functions is called.

A client using this functionality can then monitor the interactions of the GUI Library client, either an interactive user or a driver program driving through GUI Library.

As operations are being applied to the It_Event structure, these callbacks enable you to generate code or macro-record the interactions.

Only changes in It_Event can be detected.

Example

The following code is the definition of the hook function in the header file:

typedef DWORD (CALLBACK *LPFNLOGCALLBACK) (HANDLE hMr,
PPIT_EVENT ppEvt, long fnc_called, long changed,
LPARAM idx, LPARAM word02);

You need to register the callback in your program once:

DWORD DLEX It_RegisterCallback(HANDLE hMr,
LPFNLOGCALLBACK lpfncallback);

Your lpfncallback hook function is called for every ItEv_* call.

When called, the parameters to the callback function will provide all the details of what was changed in the It_Event structure.

fnc_called

GUILib function that was called

changed

A bit field of components in the It_Event structure that were changed

idx

Index of control or PFKey that is affected (depends on fnc_called)

word02

Additional information