TRACEEXP (located in \TOOLKIT\SAMPLES\SYSMGT\TRACE) shows how to create a trace event in the system-event trace buffer. The Trace Create Entry Request packet is initialized with the major code, minor code, length of data to be collected (if any), and starting address of the data (or NULL). The size of the packet and the trace release number must also be supplied.
The call to TraceCreateEntry() will place this data into the system-event trace buffer if the major and minor codes were turned on by the user. If trace is not enabled, or if the major and minor code combination is not turned on, the call to TraceCreateEntry() performs no action.
Use the Trace Formatter, provided with the OS/2 Warp Version 4 or later operating system, to look at the system-event trace buffer.
For more information on using this sample, see Starting TRACEEXP.