The compiler option NOTRC defines whether internal tracing is included in object code. Compiling with /DNOTRC does not include internal tracing (the TRACEn macros expand to a no-op); compiling without /DNOTRC includes internal tracing.
Under Microsoft® Windows NT® and Microsoft® Windows® 95, the registry entries used to control tracing are now inserted by the Setup program. The SNATRACE.EXE program can be used to enable or disable internal tracing dynamically at run time (assuming binaries have been compiled with internal tracing enabled).
When running an executable program that was compiled with internal tracing, tracing is enabled by generating the following entries in the Windows NT or Windows 95 registry:
InternalTraceLevel=n
InternalTraceFile1=file1
InternalTraceFile2=file2
The entries should be stored under:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Nap
\Parameters
When running an executable program that was compiled with internal tracing, the COMINT environment variable is used to define the level of tracing required and the file or files to which it is traced. Set this variable as follows:
SET COMINT=n/file1[/file2]
The value n is the severity level of the tracing required. All trace calls at this level or higher are included in the trace output; trace calls at lower levels are ignored. For example, setting level 10 includes all trace calls at levels 10, 12, and 16, but excludes tracing at levels 2, 4, 6, and 8. Use 0 to include all tracing at whatever level, or 20 to disable tracing entirely.
The parameters file1 and file2 are the names of files to which trace output is written. If two file names are specified, trace output is sent to the first file until it reaches 250K (or 500K for Windows NT and Windows 95) and then to the second file; when the second file also reaches 250K (or 500K for Windows NT and Windows 95), the first file is cleared and tracing continues to the first file. This process continues, changing to the other file every time the current file reaches 250K (or 500K for Windows NT and Windows 95), so that only the most recent 250-500K (or 500-1000K for Windows NT and Windows 95) of trace information is retained. If only one file name is specified, tracing continues to this file regardless of file size.