| Last change
 on this file since 1327 was             1323, checked in by Steven Levine, 17 years ago | 
        
          | 
Add properties
 | 
        
          | 
              
Property                 svn:keywords
 set to                 Author Date Id Revision | 
        
          | File size:
            992 bytes | 
      
      
| Line |  | 
|---|
| 1 |  | 
|---|
| 2 | /*********************************************************************** | 
|---|
| 3 |  | 
|---|
| 4 | $Id: dumputil.c 1323 2008-12-08 22:25:26Z stevenhl $ | 
|---|
| 5 |  | 
|---|
| 6 | Process dump facility interface | 
|---|
| 7 |  | 
|---|
| 8 | Copyright (c) 2008 Steven H. Levine | 
|---|
| 9 |  | 
|---|
| 10 | 06 Dec 08 SHL Baseline (Ticket 307) | 
|---|
| 11 |  | 
|---|
| 12 | ***********************************************************************/ | 
|---|
| 13 |  | 
|---|
| 14 | #define INCL_DOSMISC                    // DosDumpProcess | 
|---|
| 15 | #include <os2.h> | 
|---|
| 16 |  | 
|---|
| 17 | #include "errutil.h" | 
|---|
| 18 | #include "dumputil.h" | 
|---|
| 19 |  | 
|---|
| 20 | // 06 Dec 08 SHL fixme to be in OpenWatcom bsedos.h | 
|---|
| 21 | APIRET APIENTRY DosDumpProcess (ULONG Flag, ULONG Drive, PID Pid); | 
|---|
| 22 |  | 
|---|
| 23 | static PSZ pszSrcFile = __FILE__; | 
|---|
| 24 |  | 
|---|
| 25 | /** | 
|---|
| 26 | * Generate process dump if dump facility enabled | 
|---|
| 27 | * @note Need to import DosDumpProcess = DOSCALLS.113 | 
|---|
| 28 | */ | 
|---|
| 29 |  | 
|---|
| 30 | VOID DumpProcess(VOID) | 
|---|
| 31 | { | 
|---|
| 32 | APIRET apiret = DosDumpProcess(DDP_PERFORMPROCDUMP, 0, 0); | 
|---|
| 33 | // Use DbgMsg to report errors - Dos_Error probably unsafe here | 
|---|
| 34 | if (apiret) { | 
|---|
| 35 | DbgMsg(pszSrcFile, __LINE__, "DosDumpProcess DDP_PERFORMPROCDUMP reported %u", apiret); | 
|---|
| 36 | } | 
|---|
| 37 | } | 
|---|
| 38 |  | 
|---|
| 39 | #pragma alloc_text(DUMPPROCESS, DumpProcess) | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.