DosGetSTDA (Get The System Trace Data Area)

The DosGetSTDA API is a 16 bit API that returns a copy of the system trace buffer (STDA).

Syntax

The following 16 bit C language function prototype can be used to call the DosGetSTDA API:

   // 16 bit compiler
   extern unsigned far pascal DosGetSTDA( SEL, SHORT, SHORT );

   // 32 bit compiler
   APIRET16 APIENTRY16 DosGetSTDA( SEL, SHORT, SHORT );

         Where:  SEL    is the selector to the private buffer
                 SHORT  is the offset to the private buffer
                 SHORT  is the size of the buffer
                        (maximum value = 64KB)
                          records

         Returns:  0 - indicates correct operation, buffer is now filled
                       with copy of the system trace buffer
                   ERROR_SYSTEM_TRACE - System trace is not enabled

Linker Considerations

In order to successfully resolve DosGetSTDA function calls in your program, the following lines must be added to the Linker Definition (DEF) file:

IMPORTS
DOSGETSTDA=DOSCALL1.119

Remarks

DosGetSTDA returns a buffer that contains a copy of the system trace buffer. The buffer is circular with a header record that contains pointers to the first and last data bytes and a pointer to the next byte that was available for writing (the buffer is a snapshot of the system trace buffer at the time that the API was called). A set of trace records follows the header. Each trace record contains a trace event trailer and optionally a timestamp and/or a data field. A Timestamp record is optional and will only exist if bit 2 of the flag field in the Trace Event Trailer is set to OFF.

The trace event data contains the information describing each individual trace event. The events traced may be from OS/2 system supplied or other user supplied tracepoints. In either case the data is dependent on each individual tracepoint. Descriptions of the data and formatting instructions for the OS/2 system supplied tracepoints can be found in the System Tracepoints Reference chapter.


[Back: DevHlp_RAS (Add a Trace Record to the System Trace Buffer)]
[Next: Trace Buffer Structures]