From EDM2
Jump to: navigation, search

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.




flag (ULONG) input 
Flags specify the function to be performed
DDP_DISABLEPROCDUMP 0x00000000L - Disable process dumps.
DDP_ENABLEPROCDUMP 0x00000001L - Enable process dumps.
DDP_PERFORMPROCDUMP 0x00000002L - Perform process dump.
drive (ULONG) input 
The ASCII character for the drive on which process dump files are to be created. This is required only with the DDP_ENABLEPROCDUMP.
Note: Use the PROCDUMP command to customize fully the drive and path.
pid (PID) input 
The process to be dumped. 0L specified the current process; otherwise a valid process ID must be specified.
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.

Return Code

ulrc (APIRET) returns

DosDumpProcess returns the following value:


Linkage Definition

IMPORTS DosDumpProcess = DOSCALLS.113


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.

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.   */
   if (rc!=0) {
      printf("DosDumpProcess returned %u\n",rc);
      return rc;
   } /* endif */

   return 0;

Related Functions