DosSysTrace allows a subsystem or system extension to add information to the system trace buffer.
Note: DosSysTrace is a 16-bit API.
Coding Examples.
EXTRN DosSysTrace:FAR PUSH WORD MajorCode ; major trace event code (240-255) PUSH WORD Length ; length of the variable length ; area to be recorded (0-512) PUSH WORD MinorCode ; minor trace event code (0-255) PUSH@ OTHER Data ; pointer to the area to be traced ; (address parameter) CALL DOSSYSTRACE 16-bit MASM Example
APIRET16 APIENTRY16 DosSysTrace(USHORT MajorCode, USHORT Length, USHORT MinorCode, PCHAR pData); 32-bit code Example using CSet/2
Parameters
MajorCode
Results.
DosSysTrace returns the following vaules:
150
IF AX = 0 Data traced ELSE AX = Error_System_Trace Data not traced
Note: An example of when data would not be traced is if the major event code is not currently selected for tracing.
Remarks.
All trace records consist of a header and optional data. The header record is built by DosSysTrace and contains:
The optional data field contains the variable-length data as passed by the caller.
The trace facility maintains an array of 32 bytes (256 bits), in which each bit represents a major event code. This array is updated each time the user enables or disables tracing of a major event. The trace facility checks this array each time it is called to ensure that the major event specified is currently enabled for tracing. The array is located in the Global Information Segment.
A prototype definition for DosSysTrace may be found under RAS API Prototypes.