|
See also: Callback API samples
The Callback API is the programming interface of SpeedTrace Pro. It allows developers to implement their own C, C++ code while examining a dotNET application with SpeedTrace Pro. This is possible without any changes to the application's source code, commonly called the 'tracee'. The programming interface permits both the analysis and the response, enabling the user to program states simultaneously to tracing. The programming interface can be used in different ways, for example:
- to write log files
- to react to exceptions
- to set function parameters (fault simulation)
- to control test automation tools
In response to certain events that may occur during the profiling and tracing process, such as starting and stopping the trace, entering a function of the tracee, leaving a function, etc. SpeedTrace Pro can invoke a callback function written by the user.
For this purpose, the user can create a Callback DLL, containing his user-defined callback functions. A Callback DLL may be written in native code (C or C++).

Callback-DLL in native code (C, C++)
|
Depending on the kind of trace events, the user can query information about the tracee and the profiling and tracing process (for example, the name of the function actually entered, the arguments and return values of this function, etc.). On this basis, user can perform their own analyses and notifications. It is also possible to manipulate function parameters, e.g. to apply a well-defined test condition.
While configuring SpeedTrace Pro, the user can optionally select a Callback DLL and one callback function for each of the designated trace events:
Note: The configuration in the screenshot above, causes SpeedTrace Pro to invoke the function "StartTraceCallbackTest" of the Callback DLL "CallbackTest.dll", if SpeedTrace Pro is started.
|