home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tstngn.zip / DISK1.ZIP / tstngen.h < prev    next >
C/C++ Source or Header  |  1995-02-16  |  7KB  |  134 lines

  1. /* Version of 94/02/26 by Peter Kanis */
  2. /*******************************************************************************
  3. *  Project     : TSTNGEN                            Date    : 93/11/16         *
  4. *  Module      : DLL                                Version : 1                *
  5. *  Filename    : tstngen.h                          Author  : Peter Kanis      *
  6. ********************************************************************************
  7. *                                                                              *
  8. *  Description : Export header file for Test Engine/2 API functions and        *
  9. *                Macros.                                                       *
  10. *                                                                              *
  11. ********************************************************************************
  12. *                                                                              *
  13. *  (c) ADD Consulting  All Rights Reserved                                     *
  14. *                                                                              *
  15. *******************************************************************************/
  16.  
  17. #ifndef TST_DEF
  18.     #define TST_DEF
  19.  
  20. #if __cplusplus
  21.     extern "C" {
  22. #endif
  23.  
  24. /************************************************************************
  25. *       constants and dimensions                                        *
  26. *************************************************************************/
  27.  
  28. #define     TST_RESOURCE            11000   /* DO NOT CHANGE THIS CONSTANT */
  29.  
  30. #define     TST_PARAM_SIZE          20      /* Number of possible parameters    */
  31.                                             /* passed to a function             */
  32.  
  33. /************************************************************************
  34. *   Error & return constants.  (DO NOT CHANGE ANY OF THESE CONSTANTS)   *
  35. ************************************************************************/
  36.  
  37. #define     TST_OK                          0   
  38. #define     TST_ERROR_FILE_OPEN             TST_RESOURCE + 111
  39. #define     TST_ERROR_NO_TRACE_NAME         TST_RESOURCE + 112
  40. #define     TST_ERROR_EOF                   TST_RESOURCE + 113
  41. #define     TST_ERROR_FILE_READ             TST_RESOURCE + 114
  42. #define     TST_ERROR_PARAMS                TST_RESOURCE + 115
  43. #define     TST_ERROR_INVALID_LINE          TST_RESOURCE + 116
  44.  
  45.  
  46. #define     TST_TRON                        "TRUE"  /* used with TST_ON() macro */
  47. #define     TST_TROFF                       "FALSE" /* used with TST_ON() macro */
  48.  
  49. /************************************************************************
  50. *    Macros   (These are default macros and may be modified as desired) *
  51. ************************************************************************/
  52.  
  53. #ifdef TST_NGEN
  54.  
  55. #define     TST_TRACE( formatstr, v1, v2, v3, v4)   TstWriteTrace( formatstr, v1, v2, v3, v4);
  56. #define     TST_INIT( proc_name, lang_char)         TstInitProcess( proc_name, lang_char);
  57. #define     TST_STOP()                              TstStopProcess();
  58. #define     TST_REG( proc_name)                     TstRegisterProcess( proc_name);
  59. #define     TST_END()                               TstDeRegister();
  60. #define     TST_OPEN( file_name, append)            TstOpenTrace( file_name, append);
  61. #define     TST_CLOSE()                             TstCloseTrace();
  62. #define     TST_ONOFF( on_off)                      TstTraceOnOff( on_off);
  63. #define     TST_DUMP( on_off)                       TstDumpOnOff( on_off);
  64. #define     TST_DCLOSE()                            TstDumpClose();
  65.  
  66. #else
  67.  
  68. #define     TST_TRACE( formatstr, v1, v2, v3, v4)   ;
  69. #define     TST_INIT( proc_name, lang_char)         ;
  70. #define     TST_STOP()                              ;
  71. #define     TST_REG( proc_name)                     ;
  72. #define     TST_END()                               ;
  73. #define     TST_OPEN( file_name, append)            ;
  74. #define     TST_CLOSE()                             ;
  75. #define     TST_ONOFF( on_off)                      ;
  76. #define     TST_DUMP( on_off)                       ;
  77. #define     TST_DCLOSE()                            ;
  78.  
  79. #endif
  80.  
  81.  
  82. /************************************************************************/
  83. /*                                                                      */
  84. /*   DO NOT MODIFY ANY OF THE DECLARATIONS BEYOND THIS POINT.           */
  85. /*                                                                      */
  86. /************************************************************************/
  87.  
  88. /************************************************************************
  89. *   types                                                               *
  90. ************************************************************************/
  91.  
  92. typedef PSZ     TST_ARRAY_TYPE[ TST_PARAM_SIZE + 1];
  93.  
  94. typedef PVOID   HSCRIPT;
  95.  
  96. /************************************************************************
  97. *   Function prototypes.                                                *
  98. ************************************************************************/
  99.  
  100. USHORT   APIENTRY TstRegisterFunction( HSCRIPT, USHORT, PSZ, TST_ARRAY_TYPE);
  101. HSCRIPT  APIENTRY TstInitTest( int, char*[]);
  102. HSCRIPT  APIENTRY TstOpenScriptFile( PSZ);
  103. USHORT   APIENTRY TstReadScriptLine( HSCRIPT, PSZ);
  104. VOID     APIENTRY TstCloseScript( HSCRIPT);
  105. USHORT   APIENTRY TstGetFunctionNum( HSCRIPT, PSZ);
  106.  
  107. VOID     APIENTRY TstWriteTrace( PSZ,...);
  108. VOID     APIENTRY TstWriteString( PSZ);
  109.  
  110. VOID     APIENTRY TstCloseTrace( VOID);
  111. VOID     APIENTRY TstOpenTrace( PSZ, BOOL);
  112. BOOL     APIENTRY TstRegisterProcess( PSZ);
  113. BOOL     APIENTRY TstInitProcess( PSZ, char);
  114. VOID     APIENTRY TstStopProcess( VOID);
  115. VOID     APIENTRY TstDeRegister( VOID);
  116. VOID     APIENTRY TstTraceOnOff( PSZ);
  117. VOID     APIENTRY TstAppendOnOff( PSZ);
  118. VOID     APIENTRY TstDumpOnOff( PSZ); 
  119. VOID     APIENTRY TstDumpClose( VOID);
  120.  
  121. #if __cplusplus
  122.     }
  123. #endif
  124.  
  125. #endif
  126.  
  127. /******************************************************************************/
  128. /*                                                                            */
  129. /*                         (c) ADD Consulting 1994                            */
  130. /*                                                                            */
  131. /*                               END OF FILE.                                 */
  132. /*                                                                            */
  133. /******************************************************************************/
  134.