home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
os2trace.zip
/
OS2TRACE.FAQ
< prev
next >
Wrap
Text File
|
2001-01-10
|
31KB
|
631 lines
Operating System/2 API Trace Frequently Asked Questions
Q: In as simple terms as possible, how does tracing with OS/2 API Trace
really work?
A: In short, OS/2 API Trace intercepts the OS/2 API calls an application
makes, allowing it to log tracing information both before and after
calling the intended OS/2 API. How this is done is really quite
simple, albeit a little lengthy to describe in "simple" terms.
Every time an executable file makes a call to a procedure external to
itself, such as an OS/2 API, a fixup record is generated by the program
linker that tells the operating system which procedure is required when
the file is loaded at run-time. This fixup record includes information
such as what dynamic link library (DLL) contains the procedure and
which procedure it is, identified by either name or ordinal. Instead
of storing the name of each procedure's DLL within the actual fixup
record, the DLL names are instead stored together in a separate place
within the executable file, the import module name table, and an index
into this table is stored within the fixup record. This is done to
save space, in that a DLL's name is stored once per executable file
instead of once per fixup record.
When tracing is enabled for one of the supported DLLs, OS/2 API Trace
simply goes into the executable file's import module name table and
overwrites the name of the OS/2 DLL being enabled, such as "DOSCALLS",
with the name of the corresponding trace DLL, such as "T_DOS___". When
the executable file is loaded, the program loader redirects all API
calls intended for the OS/2 DLL to the exact same ordinals within the
trace DLL instead because the trace DLL's name now resides within the
import module name table. Each trace DLL mirrors its corresponding
OS/2 DLL ordinal for ordinal. If the ordinal within the OS/2 DLL
represents a published API, the trace DLL contains a matching trace API
(with identical parameter list) that logs API entry information, calls
the OS/2 API, and logs API exit information. If the ordinal within the
OS/2 DLL represents an unpublished (private) API, the trace DLL passes
the call directly to the OS/2 DLL through use of a forwarder entry.
When tracing is disabled for one of the supported DLLs, OS/2 API Trace
simply undoes what was done during enablement. That is, it goes into
the executable file's import module name table and overwrites the name
of the trace DLL being disabled, such as "T_DOS___", with the name of
the corresponding OS/2 DLL, such as "DOSCALLS". When complete, the
executable file is restored to its original state and all OS/2 API
calls go directly to the OS/2 DLL.
Q: How easy is it for a non-technical person to trace an application with
OS/2 API Trace?
A: It is really quite easy to trace an application with OS/2 API Trace as
long as one doesn't get overwhelmed by the number of options the
utility provides. Keep in mind that OS/2 API Trace provides four
unique functions: trace enablement, trace customization, trace control,
and trace summarization. Trace enablement turns on/off tracing of an
application, trace customization sets the types of trace information
generated by the application, trace control pauses/resumes tracing of
the application, and trace summarization totals the APIs in the trace
information generated by the application.
As an example, follow the simple scenario below to trace an executable
present on every OS/2 system, CMD.EXE.
Begin by opening an OS/2 window or full screen session and entering the
following commands:
md \cmdtrace
cd \cmdtrace
copy x:\os2\cmd.exe
where x is the drive on which OS/2 is installed. These commands create
a temporary copy of CMD.EXE to work on so as not to interfere with the
original copy in the \OS2 directory. A temporary copy is not really
necessary, but will avoid duplicate trace files being created in the
event that some other process uses CMD.EXE while running this scenario.
Start the tracing process by customizing OS/2 API Trace so as to get as
much trace information as possible:
os2trace -a none -b all -c off -d all -e on -f all -g all -i on -l 3
-t on -w all
After the program banner, the utility displays the former options as
well as these new options. OS/2 API Trace remembers the states of
these customization options and uses them for all future traces until
they are changed by some subsequent customization commands.
Continue the tracing process by trace-enabling CMD.EXE:
os2trace -on -all cmd.exe
After the program banner, the utility displays which DLLs were and were
not enabled for tracing. Note that in this case CMD.EXE only imports
APIs from DOSCALLS.
At this point, CMD is ready to be traced. Go ahead and execute it by
entering the following command:
cmd
Enter as few or as many commands in this new command shell as desired;
when complete, terminate the shell by entering the following command:
exit
Complete the tracing process by trace-disabling CMD.EXE so that any
future invocations of CMD.EXE do not produce additional tracing
information which overwrites CMD.TRC:
os2trace -off -all cmd.exe
After the program banner, the utility displays which DLLs were and were
not disabled for tracing.
NOTE: The TRACE-IT batch file incorporates all of the above OS2TRACE
commands and invokes the executable, so the following works just as
well:
trace-it cmd
Now go ahead and edit CMD.TRC, which contains entry and exit
information for every API used by CMD.EXE while it was executing. For
instance, note how every keystroke is read in by Kbd16CharIn and
echoed to the display by Vio16WrtTTY, using the editor's find/search
capabilities to locate these APIs within the trace information file.
Optionally extend the tracing process by summarizing the APIs used by
CMD.EXE:
os2trace -s cmd.trc
After the program banner, the utility displays an alphabetical list of
the APIs used and how many times each was invoked successfully and
unsuccessfully.
Finish by entering the following commands:
del cmd.*
cd \
rd \cmdtrace
to remove the temporary files and directory.
Q: What versions of OS/2 are supported by OS/2 API Trace?
A: OS/2 API Trace supports all 32-bit versions of OS/2:
Name | Major Version | Minor Version
------------------------------------+---------------+--------------
OS/2 Version 2.0 | 20 | 0
OS/2 Version 2.1 | 20 | 10
OS/2 Version 2.11 | 20 | 11
OS/2 Warp Version 3 | 20 | 30
OS/2 Warp Version 4 | 20 | 40
OS/2 Warp Server for e-business | 20 | 45
OS/2 Warp Connect (PowerPC Edition) | 30 | 0
where major and minor versions are the corresponding values returned
from DosQuerySysInfo. Note that the ELF versions of the executables
and trace DLLs are required to run on OS/2 Warp Connect (PowerPC
Edition).
Q: What purpose does each file serve in OS/2 API Trace?
A: The files that comprise the OS/2 API Trace utility are described in the
following table:
Name | Purpose
-------------+---------------------------------------------------------
OS2TRACE.NWS | Text file describing the change history of the complete
| OS/2 API Trace package
OS2TRACE.DOC | Text file providing a technical description of OS/2 API
| Trace, its usage and output, and a typical scenario
OS2TRACE.FAQ | Text file providing answers to the most frequently asked
| questions about OS/2 API Trace
OS2TRACE.API | Text file containing all of the supported APIs along
| with their OS/2 DLL, trace API group (if any), and
| minimum required version of 32-bit OS/2
OS2TRACE.EXE | OS/2 API Trace command line interface
PMOS2TRC.EXE | OS/2 API Trace Presentation Manager (graphical)
| interface
PMOS2TRC.HLP | Online help for the Presentation Manager interface
TRACE-IT.CMD | Batch file that performs all commands necessary to trace
| a .EXE file
CHK4TRC.DOC | Text file providing a technical description of the
| trace-enabled executable checker, its usage and output
CHK4TRC.EXE | Trace-enabled executable checker command line interface
STRIPAPI.DOC | Text file providing a technical description of the
| trace information file API stripper, its usage and
| output
STRIPAPI.EXE | Trace information file API stripper command line
| interface
T_*.DLL | Trace DLLs
Q: Why won't OS/2 API Trace enable tracing of a DLL that has an API
imported by name?
A: This restriction was removed as of version 2.45.18 except for the
following APIs:
PMDRAG.DRGACCESSDRAGINFO PMPIC.PICPRINT
PMDRAG.DRGADDSTRHANDLE PMPIC.PICICHG
PMDRAG.DRGALLOCDRAGINFO PMPIC.PIF2MET
PMDRAG.DRGALLOCDRAGTRANSFER PMPIC.PRFPIF2MET
PMDRAG.DRGDELETEDRAGINFOSTRHANDLES PMPIC.PIC32PRINT
PMDRAG.DRGDELETESTRHANDLE PMPIC.PIC32ICHG
PMDRAG.DRGDRAG PMPIC.PRF32PIF2MET
PMDRAG.DRGFREEDRAGINFO
PMDRAG.DRGFREEDRAGTRANSFER
PMDRAG.DRGGETPS
PMDRAG.DRGPOSTTRANSFERMSG
PMDRAG.DRGPUSHDRAGINFO
PMDRAG.DRGQUERYDRAGITEM
PMDRAG.DRGQUERYDRAGITEMCOUNT
PMDRAG.DRGQUERYDRAGITEMPTR
PMDRAG.DRGQUERYNATIVERMF
PMDRAG.DRGQUERYNATIVERMFLEN
PMDRAG.DRGQUERYSTRNAME
PMDRAG.DRGQUERYSTRNAMELEN
PMDRAG.DRGQUERYTRUETYPE
PMDRAG.DRGQUERYTRUETYPELEN
PMDRAG.DRGRELEASEPS
PMDRAG.DRGSENDTRANSFERMSG
PMDRAG.DRGSETDRAGPOINTER
PMDRAG.DRGSETDRAGIMAGE
PMDRAG.DRGSETDRAGITEM
PMDRAG.DRGVERIFYNATIVERMF
PMDRAG.DRGVERIFYRMF
PMDRAG.DRGVERIFYTRUETYPE
PMDRAG.DRGVERIFYTYPE
PMDRAG.DRGVERIFYTYPESET
PMDRAG.DRGDRAGFILES
PMDRAG.DRGACCEPTDROPPEDFILES
The reason that these PMDRAG APIs are unsupported is that between OS/2
2.10 and 2.30 their names were changed to include "16" in the prefix
(for example, DRGACCESSDRAGINFO became DRG16ACCESSDRAGINFO); the newer
names are supported. The reason that these PMPIC APIs are unsupported
is that between OS/2 2.30 and 2.40 their names were changed to mixed
case (for example, PICPRINT became PicPrint); the newer names are
supported. Special versions of the PMDRAG and PMPIC trace DLLs that
support the older names can be requested from the author.
Q: Why does the date and time stamp of an executable file change when
tracing is enabled or disabled?
A: An executable file's date and time stamp changes whenever a supported
DLL is enabled or disabled for tracing because the file's import module
name table is updated and the changes written to disk. Nothing else
within the executable file is affected by OS/2 API Trace.
NOTE: As of version 2.40.85, the executable file's date and time stamp
can be preserved through use of OS2TRACE's -P option and PMOS2TRC's
"Preserve file date/time stamp" item on the "Enable" submenu.
Q: Can DLLs be traced through OS/2 API Trace?
A: Yes, OS/2 API Trace will work on any segmented (16-bit, NE format) or
linear (32-bit, LX format) executable file, such as .EXE, .COM, and
.DLL files. Any trace information generated by a DLL, however, cannot
be stored in a trace information file named after the .DLL file because
DLLs can be shared by more than one process. As a result, all trace
information generated by a DLL is stored in a trace information file
named after the .EXE or .COM file. For example, if A.EXE imports from
B.DLL and B.DLL is trace-enabled, the trace information from B.DLL is
logged to A.TRC when A.EXE is executed.
There is no limit to the number of DLLs that can be traced at once, but
trace information from all DLLs is logged to a single trace information
file named after the .EXE or .COM file that directly or indirectly
loaded the DLLs.
Q: Can 16-bit APIs be traced with OS/2 API Trace?
A: Yes, all the 16-bit APIs present in the Base subsystem (Dos, Kbd, Mou,
and Vio APIs) and Presentation Manager subsystem (Dev, Drg, Gpi, Pic,
Prf, Prt, Spl, and Win APIs) are supported as of version 2.40.34. See
OS2TRACE.API for a table containing all supported APIs.
Q: Can SMP (Symmetric Multiprocessing) APIs be traced with OS/2 API Trace?
A: Yes, all the 16-bit and 32-bit SMP APIs present in the Base subsystem
(Dos APIs) are supported as of version 2.40.61. See OS2TRACE.API for a
table containing all supported APIs.
Q: Can APIs loaded by the application at run-time through Dos16GetProcAddr
or Dos32QueryProcAddr be traced with OS/2 API Trace?
A: Yes, OS2TRACE's -I option and PMOS2TRC's "API interception" item on the
"Customize" submenu enable interception and tracing of these APIs, also
known as dynamically loaded APIs. This functionality is available as
of version 2.40.36.
NOTE: In order to intercept dynamic API calls, DOSCALLS must be enabled
for tracing even though Dos16GetProcAddr and Dos32QueryProcAddr do not
have to actually be traced.
Q: What needs to be done to trace all APIs of a specific type, such as Dos
APIs or Win APIs?
A: Use the following table to determine which DLL or DLLs to enable for
tracing in order to trace all APIs of a specific API type:
API Type | DLL(s)
-------------+---------------------------------------------------------
Ddf (32-bit) | HELPMGR
Dev (16-bit) | PMGPI
Dev (32-bit) | PMGPI
Dos (16-bit) | DOSCALLS, MSG, NLS, MONCALLS, NAMPIPES, PMSPL, SESMGR,
| QUECALLS
Dos (32-bit) | DOSCALLS, MSG, NLS, SESMGR, QUECALLS
Drg (16-bit) | PMDRAG
Drg (32-bit) | PMDRAG
Gpi (16-bit) | PMBIDI, PMGPI, PMWIN
Gpi (32-bit) | PMBIDI, PMGPI
Kbd (16-bit) | KBDCALLS
Mou (16-bit) | MOUCALLS
Pic (16-bit) | PMPIC
Pic (32-bit) | PMPIC
Prf (16-bit) | PMSHAPI
Prf (32-bit) | PMSHAPI
Prt (16-bit) | PMSPL
Prt (32-bit) | PMSPL
Spl (16-bit) | PMSPL
Spl (32-bit) | PMSPL
Vio (16-bit) | VIOCALLS
Win (16-bit) | HELPMGR, PMBIDI, PMSHAPI, PMVIOP, PMWIN
Win (32-bit) | HELPMGR, PMBIDI, PMCTLS, PMMERGE, PMSHAPI, PMWIN, PMWP
Note that some DLLs contain more than one API type, such as HELPMGR and
PMSPL, so there may be some overlap of API types involved when enabling
one of these DLLs for tracing.
Q: Where are all those APIs in the trace information file coming from that
aren't part of the application's source code?
A: The C run-time. Remember that OS/2 API Trace intercepts every OS/2 API
call made by an application being traced, and the C run-time requires
OS/2 APIs to function properly under OS/2. For instance, the run-time
needs DosWrite in order to implement fprintf.
Q: Can network APIs be traced with OS/2 API Trace?
A: No, OS/2 API Trace only covers APIs included in the basic operating
system, which includes the Base, Presentation Manager, and Workplace
Shell subsystems. Operating system extensions such as Multimedia,
TCP/IP, and Network are not supported. See OS2TRACE.API for a table
containing all supported APIs.
Q: Are there any special steps should be taken to trace an application
over a long period of time, such as hours or even days?
A: Outside of a minimal performance impact, OS/2 API Trace does not hinder
the functionality of any APIs being traced, so no unusual steps are
required to trace an application over a long period of time. However,
a couple of customization options are provided that may be beneficial
when tracing over large periods of time.
The first such option is time stamping, which is specified through
OS2TRACE's -T option and PMOS2TRC's "Time stamping" item on the
"Customize" submenu and is available as of version 2.30.18. When time
stamping is enabled, all API entries and exits are marked with the time
they occurred accurate to a hundredth of a second. Time stamping can
be quite useful to record when exactly APIs were called while logging
several hours of trace information.
The second option is file wrapping, which is specified through
OS2TRACE's -F option and PMOS2TRC's "File wrapping" item on the
"Customize" submenu and is available as of version 2.30.17. When file
wrapping is enabled, only a certain amount of trace information is
logged before the trace information file is overwritten starting from
the beginning. File wrapping can be quite useful to set an absolute
limit to the trace information file size, because, depending on the
level of trace information requested and the number of APIs being
traced, OS/2 API Trace can generate megabytes upon megabytes of
information rather quickly.
NOTE: Setting the log file wrapping length to anything other than ALL
will further impact the performance of the application being traced, as
log file wrapping requires the log file to be unbuffered, meaning that
trace information cannot be buffered in a memory cache before being
written to disk.
Q: It is documented that OS/2 API Trace can trace APIs from the latest
version of OS/2. Does this mean that it cannot work on earlier
versions of OS/2 because the latest APIs were not yet present on them?
A: OS/2 API Trace will work on ALL versions of 32-bit OS/2, or OS/2 2.x.
This is possible because the trace DLLs dynamically load all APIs added
to OS/2 after version 2.00 through use of the DosQueryProcAddr API.
Only APIs supported by OS/2 2.00 are actually imported by the trace
DLLs.
Q: Will OS/2 API Trace work on 16-bit versions of OS/2?
A: No, all executable files that comprise OS/2 API Trace are of the linear
(32-bit, LX) executable file format, which is unknown to all versions
of 16-bit OS/2, or OS/2 1.x. The 16-bit APIs that OS/2 API Trace
supports can only be traced under OS/2 2.x.
Q: How can an application be traced if it resides on a disk with little,
if any, available space?
A: An alternative logging directory can be specified through OS2TRACE's -A
option and PMOS2TRC's "Alternative directory" item on the "Customize"
submenu and is available as of version 2.45.24. When a fully qualified
drive and path is specified for the alternative directory, it overrides
the default directory (same as the .EXE/.COM file) and all trace
information files are generated within it. This allows applications
that reside on disks with space constraints to be traced by specifying
an alternative directory on a different drive altogether.
Q: When under disk space constraints, can only the trace DLLs needed be
placed on the system where the tracing will take place?
A: Yes, the only trace DLLs that are required in order for tracing to take
place are T_COMMON.DLL and whatever trace DLLs have been enabled for
tracing. The only exceptions to this rule are in the following table:
Trace DLL | Other Required Trace DLLs
-------------+---------------------------------------------------------
T_CTL_.DLL | T_DRG_.DLL
T_DOS___.DLL | T_KBD___.DLL, T_M.DLL, T_MON___.DLL, T_MOU___.DLL,
| T_N.DLL, T_PIP___.DLL, T_QUE___.DLL, T_SES_.DLL,
| T_VIO___.DLL
T_MRG__.DLL | T_GPI.DLL, T_SHL__.DLL, T_WIN.DLL
These other trace DLLs are required because the trace DLLs in the left
column import trace APIs from the trace DLLs in the right column. The
following table shows all of the supported OS/2 DLLs and their
corresponding trace DLLs:
OS/2 DLL | Trace DLL
-------------+-------------
DOSCALLS.DLL | T_DOS___.DLL
HELPMGR.DLL | T_HLP__.DLL
KBDCALLS.DLL | T_KBD___.DLL
MONCALLS.DLL | T_MON___.DLL
MOUCALLS.DLL | T_MOU___.DLL
MSG.DLL | T_M.DLL
NAMPIPES.DLL | T_PIP___.DLL
NLS.DLL | T_N.DLL
PMBIDI.DLL | T_PBD_.DLL
PMCTLS.DLL | T_CTL_.DLL
PMDRAG.DLL | T_DRG_.DLL
PMGPI.DLL | T_GPI.DLL
PMMERGE.DLL | T_MRG__.DLL
PMPIC.DLL | T_PIC.DLL
PMSHAPI.DLL | T_SHL__.DLL
PMSPL.DLL | T_SPL.DLL
PMVIOP.DLL | T_PVP_.DLL
PMWIN.DLL | T_WIN.DLL
PMWP.DLL | T_WP.DLL
QUECALLS.DLL | T_QUE___.DLL
SESMGR.DLL | T_SES_.DLL
VIOCALLS.DLL | T_VIO___.DLL
Q: Can only the files needed be replaced when updating to a later version
of OS/2 API Trace?
A: It is not recommended, as OS/2 API Trace may (and usually will) change
internally from release to release. In fact, as of version 2.40.58, an
error is issued if the version of one of the required trace DLLs does
not match the version of T_COMMON. Make sure that all the files that
comprise OS/2 API Trace have the same date and time stamps before
attempting to use the utility.
The sizes and date and time stamps of all the files that comprise the
latest release, Version 2.45.26, are shown in the following table:
Name | Size | Date | Time
-------------+--------+----------+------
OS2TRACE.NWS | 38386 | 01-10-01 | 5:00p
OS2TRACE.DOC | 50562 | 01-10-01 | 5:00p
OS2TRACE.FAQ | 30655 | 01-10-01 | 5:00p
OS2TRACE.API | 124821 | 01-10-01 | 5:00p
OS2TRACE.EXE | 90754 | 01-10-01 | 5:00p
PMOS2TRC.EXE | 160095 | 01-10-01 | 5:00p
PMOS2TRC.HLP | 232828 | 01-10-01 | 5:00p
TRACE-IT.CMD | 3022 | 01-10-01 | 5:00p
CHK4TRC.DOC | 3705 | 01-10-01 | 5:00p
CHK4TRC.EXE | 49405 | 01-10-01 | 5:00p
STRIPAPI.DOC | 2987 | 01-10-01 | 5:00p
STRIPAPI.EXE | 54496 | 01-10-01 | 5:00p
T_COMMON.DLL | 328929 | 01-10-01 | 5:00p
T_CTL_.DLL | 27864 | 01-10-01 | 5:00p
T_DOS___.DLL | 185786 | 01-10-01 | 5:00p
T_DRG_.DLL | 49512 | 01-10-01 | 5:00p
T_GPI.DLL | 236951 | 01-10-01 | 5:00p
T_HLP__.DLL | 33113 | 01-10-01 | 5:00p
T_KBD___.DLL | 32858 | 01-10-01 | 5:00p
T_M.DLL | 28021 | 01-10-01 | 5:00p
T_MON___.DLL | 26682 | 01-10-01 | 5:00p
T_MOU___.DLL | 35002 | 01-10-01 | 5:00p
T_MRG__.DLL | 41849 | 01-10-01 | 5:00p
T_N.DLL | 27829 | 01-10-01 | 5:00p
T_PBD_.DLL | 31992 | 01-10-01 | 5:00p
T_PIC.DLL | 25767 | 01-10-01 | 5:00p
T_PIP___.DLL | 31914 | 01-10-01 | 5:00p
T_PVP_.DLL | 26728 | 01-10-01 | 5:00p
T_QUE___.DLL | 31674 | 01-10-01 | 5:00p
T_SES_.DLL | 28072 | 01-10-01 | 5:00p
T_SHL__.DLL | 55641 | 01-10-01 | 5:00p
T_SPL.DLL | 76167 | 01-10-01 | 5:00p
T_VIO___.DLL | 52762 | 01-10-01 | 5:00p
T_WIN.DLL | 226183 | 01-10-01 | 5:00p
T_WP.DLL | 33302 | 01-10-01 | 5:00p
Q: Why do some 16-bit applications trap or behave differently when being
traced?
A: Traps and/or different behavior when tracing 16-bit applications is
usually a sign of stack overwriting and/or stack overflow. The problem
stems from the fact that stacks for all 16-bit threads must be provided
by the programmer, which often leads to stacks that are surrounded by
data variables and/or stacks that do not have the recommended amount of
space available (4KB) when calling into an OS/2 API. This problem does
not usually occur in the case of 32-bit threads because the programmer
need only provide a stack size, resulting in a separate object for the
stack being allocated by the operating system. Regardless, tracing
does require additional stack space over and above what is required
normally, as shown in the following table:
API | Additional Stack Space Requirement (in bytes)
-------+---------------------------------------------------------------
16-bit | 122 + ( 2 * sizeof( parameters ) )
32-bit | sizeof( parameters )
This slight overhead can easily lead to traps or different behavior.
If these symptoms occur when tracing your own application, increase the
stack size for all of your threads and try again.
Q: What is trace control good for?
A: Trace control allows tracing to be paused (no logging occurs) and
resumed (normal logging occurs ) while trace-enabled applications are
running. This is especially useful when only interested in tracing a
specific behavior of an application. For example, pause tracing, start
the application and let it run to the point where tracing is desired,
resume tracing, perform the desired function, pause tracing again, and
let the application run to termination. The trace information file
will only contain API calls made while tracing was active (resumed),
which are just those APIs associated with the specific behavior.
Q: What is trace summarization good for?
A: Summarizing a trace information file produces an alphabetical listing
of all the APIs called by an application and how many times each API
was successfully and unsuccessfully called. This information can be
quite useful in determining where erroneous API calls can be removed
or repaired and where performance enhancements can be made.
Q: Why are there so many failures logged when tracing certain APIs, such
as WinDefWindowProc, when the application clearly works?
A: Some Presentation Manager APIs return identical values with different
meanings based solely on the input parameters. This is most evident in
APIs dealing with messages, where some messages will return zero to
indicate success while others will return zero to indicate failure.
Instead of going through rather lengthy logic to determine whether a
return value indicates success or failure for this small group of APIs,
OS/2 API Trace assumes that zero indicates failure and non-zero
indicates success.
NOTE: As of version 2.40.45, OS/2 API Trace considers the following
APIs' return codes to be indeterminate (neither successful nor
unsuccessful):
Drg16SendTransferMsg
Drg32SendTransferMsg
Win16DdeRespond
Win32DdeRespond
Win16DefDlgProc
Win32DefDlgProc
Win32DefFileDlgProc
Win32DefFontDlgProc
Win16DefWindowProc
Win32DefWindowProc
Win16DispatchMsg
Win32DispatchMsg
Win16SendDlgItemMsg
Win32SendDlgItemMsg
Win16SendMsg
Win32SendMsg
Win16SetErrorInfo
Win32SetErrorInfo
Q: Why would an application appear to terminate prematurely?
A: OS/2 API Trace is an OS/2 application and thereby constrained by OS/2
resource limits, especially those that apply to memory, semaphores,
files, and Presentation Manager. Should tracing appear to terminate
the application prematurely, make sure to pay attention to any error
messages displayed either to the console or in a message box. Also,
make sure to check the contents of both OS2TRACE.ERR and PMOS2TRC.ERR
in the root directory of the boot drive.
Q: Why aren't some of the supported Dos APIs in DOSCALLS.DLL getting
traced even when DOSCALLS is enabled for tracing?
A: If the missing APIs are listed in OS2TRACE.API, then make sure the
application does not import any of the APIs from DOSCALL1.DLL through
its module definitions file (.DEF), as in the following:
IMPORTS
DosQueryThreadContext=DOSCALL1.877
If this is indeed the case, change DOSCALL1 to DOSCALLS and rebuild the
application. This will not affect the application as DOSCALLS and
DOSCALL1 and virtually the same to the application even though it is
possible to import APIs from both simultaneously.
Currently OS/2 API Trace only traces DOSCALLS APIs because the standard
32-bit OS/2 library, OS2386.LIB, does not contain any references to
DOSCALL1.
Q: Is there a means for reporting OS/2 API Trace bugs?
A: Yes! Please send all problem reports to the author, Dave Blaschke, at
whichever of the following IDs is most appropriate:
Internal to IBM (Notes) - Dave Blaschke@IBMUS
Internal to IBM (VM) - IBMUSM26(BLASCHKE)
External to IBM - blaschke@us.ibm.com
or, if undeliverable, to deblaschke@yahoo.com. Comments, questions,
and suggestions are also welcome.