Purpose
DosDumpProcess initiates a process dump from a specified process. This may be used as part of an error handling routine to gather information about an error that may be analyzed later using the OS/2 System Dump Formatter. Configuration of Process Dump may be done using the PDUMPSYS, PDUMPUSR, and PROCDUMP commands.
Syntax
#define INCL_DOSMISC #include os2.h>
APIRET APIENTRY DosDumpProcess
Parameters
flag (ULONG) input
DDP_DISABLEPROCDUMP 0x00000000L
Note: Use the PROCDUMP command to customize fully the drive and path.
Note: Use the PDUMPUSR command to specify what information will be dumped. Use the PROCDUMP command to customize options per process and in particular to specify whether child or parent process will be dumped. This parameter is actioned only with DDP_PERFORMPROCDUMP.
Returns
ulrc (APIRET) returns
DosDumpProcess returns the following value
87
Remarks
For maximum flexibility the use of DosDumpProcess should be limited to the DDP_PERFORMPROCDUMP function. This allows you to specify whether Process Dump should be enabled through the use of the PROCDUMP command. You may customize Process Dump completely through use of the PDUMPUSR, PDUMPSYS, AND PROCDUMP commands. For further information, see PROCDUMP.DOC in the OS2\SYSTEM\RAS directory. DDP_ENABLEPROCDUMP and DDP_DISABLEPROCDUMP are provided for backwards compatibility only.
Related Functions
Example Code
int main (int argc, char *argv[], char *envp[]){ APIRET rc; /* Take a process dump;leave drive specification as specified by the user in the */ /* PROCDUMP command. If the user has not enabled process dump using PROCDUMP ON, then */ /* ERROR_INVALID_PARAMETER is returned. */ rc=DosDumpProcess(DDP_PERFORMPROCDUMP,0L,0L); if (rc!=0) { printf("DosDumpProcess returned %u\n",rc); return rc; } /* endif */ return 0; }