SESMGR APIs
SESMGR APIs are entered either directly or indirectly via a SESMGR thunking layer as shown below:
Direct call: APPL ────────────────────> SESMGR <──────────────────── Thunked call: APPL ────> SESMGR Thunk Layer ─────> SESMGR <──── SESMGR Thunk Layer <─────
Direct Calls:
Used for 16-bit APIs. Use TRACE ON SESMGR(....) for tracing APIs and return information.
Used for 32-bit SESMGR APIs. Trace the 16-bit SESMGR API with the 32-bit SESMGR API to record the return information to the original 32-bit caller. For example, to trace the return information and parameters to DosStartSession from a 32-bit caller use: TRACE ON SESMGR(20,34,32788). The following is an example of the traced output:
(OS) DosStartSession Post-Invocation Event [8] Major [23/0x0017] Minor [32788/0x8014] PID [62/0x003e] Length [12] Time [10:44:23.01] New Process Id = 0000 New Session = f0000 Return Code = 0000 (OS) DosStartSession Pre-Invocation Event [16] Major [23/0x0017] Minor [20/0x0014] PID [62/0x003e] Length [60] Time [10:44:22.77] Return address = DFD7:BD0C Start Data = 0032 0000 0000 0000 62D4 004F 2B54 004F CA10 045F 0000 0000 0000 0000 0001 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 (OS) Dos32StartSession Pre-Invocation Event [17] Major [23/0x0017] Minor [34/0x0022] PID [62/0x003e] Length [7] Time [10:44:22.77] Return address = 0002E7E2
In this example the return address to the 32-bit application is given in minor code 34.
For a list of indirected SESMR APIs see: Indirected Session Manager API Tracepoints.