home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / trace.h < prev    next >
Text File  |  1999-03-15  |  6KB  |  103 lines

  1. /********************** START OF HEADER SPECIFICATION ***********************/
  2. /*                                                                          */
  3. /* FILE NAME: TRACE.H                                                       */
  4. /*                                                                          */
  5. /* COMPONENT NAME: TRACE                                                    */
  6. /*                                                                          */
  7. /* FUNCTIONS:  This header file contains the data structures pertaining     */
  8. /*             to the Trace API's                                           */
  9. /*                                                                          */
  10. /*             Specifically, the API's covered are:                         */
  11. /*                                                                          */
  12. /*             TraceCreateEntry -                                           */
  13. /*                  Create an entry in the WPOS system event buffer         */
  14. /*                                                                          */
  15. /* (C) COPYRIGHT International Business Machines Corp., 1994, 1996          */
  16. /* All Rights Reserved                                                      */
  17. /* Licensed Materials - Property of IBM                                     */
  18. /*                                                                          */
  19. /* US Government Users Restricted Rights - Use, duplication or              */
  20. /* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.        */
  21. /*                                                                          */
  22. /* DESCRIPTION:                                                             */
  23. /*     Trace facility api                                                   */
  24. /*                                                                          */
  25. /********************* END OF HEADER SPECIFICATION **************************/
  26.  
  27. /*--------------------------------------------------------------------------*/
  28. /* Define Entries                                                           */
  29. /*--------------------------------------------------------------------------*/
  30.  
  31. #ifndef __TRACEH__
  32.   #define __TRACEH__
  33.  
  34. #ifndef INCL_TRACE
  35.   #define INCL_TRACE
  36. #endif
  37.  
  38. /*--------------------------------------------------------------------------*/
  39. /* Definitions:                                                             */
  40. /*--------------------------------------------------------------------------*/
  41.  
  42. /*--------------------------------------------------------------------------*/
  43. /* TRACE ERROR RETURN CODE DEFINES                                          */
  44. /*--------------------------------------------------------------------------*/
  45. #define ERROR_TRACE_COLLECTION_MODE_NOT_WRAP    91
  46. #define ERROR_NOT_A_CFF_INFERRED_FILE           92
  47. #define ERROR_NOT_A_CFF_FILE                    93
  48. #define ERROR_NOT_A_CFF_RAW_FILE                94
  49. #define ERROR_TRC_SYNTAX                      1055
  50.  
  51. #define INVALID_PACKET_REVISION_NUMBER        1801
  52. #define INVALID_TRACE_MAJOR_CODE              1802
  53. #define INVALID_TRACE_MINOR_CODE              1803
  54. #define INVALID_TRACE_COMMAND_VALUE           1805
  55. #define INVALID_PACKET_SIZE                   1806
  56. #define ERROR_TRACE_SESSION_NOT_RUNNING       1807
  57. #define ERROR_IN_MK_INTERFACE                 3004
  58. #define ERROR_TRACE_COLLECTION_MODE_WRAP      3005
  59. #define INVALID_BUFFER_SIZE                   5000
  60. #define ERROR_TRC_OUT_OF_MEMORY               5001
  61.  
  62. #define MEMORY_ALLOC_ERROR  ERROR_TRC_OUT_OF_MEMORY
  63.  
  64. /*--------------------------------------------------------------------------*/
  65. /* TRACE MISC DEFINES                                                       */
  66. /*--------------------------------------------------------------------------*/
  67. #define MIN_MAJOR_EVENT_CODE           1
  68. #define MAX_MAJOR_EVENT_CODE           255
  69. #define MIN_MINOR_EVENT_CODE           1
  70. #define MAX_MINOR_EVENT_CODE           65535
  71.  
  72. #define MAX_SYSTEM_TRACE_BUFFER_SIZE   63*1024
  73. #define MAX_TRACE_EVENT_DATA_SIZE      2044
  74.  
  75. #define TRACE_RELEASE   2
  76.  
  77. /*--------------------------------------------------------------------------*/
  78. /* Structures for TraceCreateEntry API:                                     */
  79. /*--------------------------------------------------------------------------*/
  80. typedef struct _TCEREQUEST
  81. {
  82.   ULONG packet_size;                   /* Size of packet in bytes           */
  83.   ULONG packet_revision_number;        /* Revision level of packet          */
  84.   ULONG major_event_code;              /* Major code event to be logged     */
  85.   ULONG minor_event_code;              /* Minor code event to be logged     */
  86.   ULONG event_data_length;             /* Length of callers event buffer    */
  87.   PVOID event_data;                    /* Pointer to callers buffer         */
  88. } TCEREQUEST, *PTCEREQUEST;
  89.  
  90. /*--------------------------------------------------------------------------*/
  91. /* Function prototypes                                                      */
  92. /*--------------------------------------------------------------------------*/
  93.  
  94. USHORT _Far16 _Pascal DosSysTrace(
  95.         USHORT  Major,                 /* major code                 */
  96.         USHORT  Length,                /* length of variable buffer  */
  97.         USHORT  Minor,                 /* minor code                 */
  98.         PBYTE   Buffer);               /* variable length buffer     */
  99.  
  100. APIRET _System TraceCreateEntry(PTCEREQUEST pTraceCreateEntry);
  101.  
  102. #endif  /* __TRACEH__ */
  103.