home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Database / CLIPR503.W96 / ERROR.AP_ / ERROR.AP
Encoding:
Text File  |  1995-06-26  |  2.3 KB  |  86 lines

  1. /***
  2. *
  3. *   Error.api
  4. *
  5. *   C language definitions for Clipper Error API
  6. *
  7. *   Copyright (c) 1992-1995, Computer Associates, International
  8. *   All rights reserved.
  9. *
  10. *   CA-Clipper uses Microsoft C large model calling conventions
  11. *
  12. */
  13.  
  14. #ifndef _ERROR_API
  15.  
  16.    #define _ERROR_API
  17.  
  18.    #ifdef __cplusplus
  19.       extern "C" {
  20.    #endif
  21.  
  22.    #ifndef _CLIPDEFS_H
  23.       #include "clipdefs.h"
  24.    #endif
  25.  
  26.    typedef void * ERRORP;
  27.  
  28.    /*
  29.    *   error flag definations
  30.    */
  31.  
  32.    #define EF_CANRETRY     1
  33.    #define EF_CANDEFAULT   4
  34.  
  35.    /*
  36.    *   error codes (returned from _errLaunch())
  37.    */
  38.  
  39.    #define E_BREAK         0xffff
  40.    #define E_RETRY         1
  41.    #define E_DEFAULT       0
  42.  
  43.    /*
  44.    *   error creation, activation, and destruction
  45.    */
  46.    extern ERRORP  _errNew     ( void );
  47.    extern ERRCODE _errLaunch  ( ERRORP error );
  48.    extern void    _errRelease ( ERRORP error );
  49.  
  50.  
  51.    /*
  52.    *   error "put" functions
  53.    */
  54.    extern ERRORP  _errPutSeverity   ( ERRORP error, USHORT severity  );
  55.    extern ERRORP  _errPutGenCode    ( ERRORP error, USHORT gencode   );
  56.    extern ERRORP  _errPutOsCode     ( ERRORP error, USHORT oscode    );
  57.    extern ERRORP  _errPutFlags      ( ERRORP error, USHORT flags     );
  58.    extern ERRORP  _errPutTries      ( ERRORP error, USHORT tries     );
  59.    extern ERRORP  _errPutSubCode    ( ERRORP error, USHORT subcode   );
  60.    extern ERRORP  _errPutSubSystem  ( ERRORP error, BYTEP  subsystem );
  61.    extern ERRORP  _errPutDescription( ERRORP error, BYTEP  desc      );
  62.    extern ERRORP  _errPutOperation  ( ERRORP error, BYTEP  operation );
  63.    extern ERRORP  _errPutFileName   ( ERRORP error, BYTEP  filename  );
  64.  
  65.  
  66.    /*
  67.    *   error "get" functions
  68.    */
  69.    extern USHORT  _errGetSeverity   ( ERRORP error );
  70.    extern USHORT  _errGetGenCode    ( ERRORP error );
  71.    extern USHORT  _errGetOsCode     ( ERRORP error );
  72.    extern USHORT  _errGetFlags      ( ERRORP error );
  73.    extern USHORT  _errGetTries      ( ERRORP error );
  74.    extern USHORT  _errGetSubCode    ( ERRORP error );
  75.    extern BYTEP   _errGetSubSystem  ( ERRORP error );
  76.    extern BYTEP   _errGetDescription( ERRORP error );
  77.    extern BYTEP   _errGetOperation  ( ERRORP error );
  78.    extern BYTEP   _errGetFileName   ( ERRORP error );
  79.  
  80.    #ifdef __cplusplus
  81.       }
  82.    #endif
  83.  
  84. #endif
  85.  
  86.