Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
3.4 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 1995 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: DNetErrors.h
  6. * Content: Function for expanding DNet errors to debug output
  7. *@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 12/04/98 johnkan Created
  12. *@@END_MSINTERNAL
  13. *
  14. ***************************************************************************/
  15. #ifndef __DNET_ERRORS_H__
  16. #define __DNET_ERRORS_H__
  17. //**********************************************************************
  18. // Constant definitions
  19. //**********************************************************************
  20. //
  21. // enumerated values to determine error class
  22. typedef enum
  23. {
  24. EC_DPLAY8,
  25. #ifndef DPNBUILD_NOSERIALSP
  26. EC_TAPI,
  27. #endif // ! DPNBUILD_NOSERIALSP
  28. EC_WIN32,
  29. EC_WINSOCK
  30. // no entry for TAPI message output
  31. } EC_TYPE;
  32. //**********************************************************************
  33. // Macro definitions
  34. //**********************************************************************
  35. #ifdef DBG
  36. // ErrorLevel = DPF level for outputting errors
  37. // DNErrpr = DirectNet error code
  38. #define DisplayString( ErrorLevel, String ) LclDisplayString( ErrorLevel, String )
  39. #define DisplayErrorCode( ErrorLevel, Win32Error ) LclDisplayError( EC_WIN32, ErrorLevel, Win32Error )
  40. #define DisplayDNError( ErrorLevel, DNError ) LclDisplayError( EC_DPLAY8, ErrorLevel, DNError )
  41. #define DisplayWinsockError( ErrorLevel, WinsockError ) LclDisplayError( EC_WINSOCK, ErrorLevel, WinsockError )
  42. #ifndef DPNBUILD_NOSERIALSP
  43. #define DisplayTAPIError( ErrorLevel, TAPIError ) LclDisplayError( EC_TAPI, ErrorLevel, TAPIError )
  44. #define DisplayTAPIMessage( ErrorLevel, pTAPIMessage ) LclDisplayTAPIMessage( ErrorLevel, pTAPIMessage )
  45. #endif // ! DPNBUILD_NOSERIALSP
  46. #else // DBG
  47. #define DisplayString( ErrorLevel, String )
  48. #define DisplayErrorCode( ErrorLevel, Win32Error )
  49. #define DisplayDNError( ErrorLevel, DNError )
  50. #define DisplayWinsockError( ErrorLevel, WinsockError )
  51. #ifndef DPNBUILD_NOSERIALSP
  52. #define DisplayTAPIError( ErrorLevel, TAPIError )
  53. #define DisplayTAPIMessage( ErrorLevel, pTAPIMessage )
  54. #endif // ! DPNBUILD_NOSERIALSP
  55. #endif // DBG
  56. //**********************************************************************
  57. // Structure definitions
  58. //**********************************************************************
  59. #ifndef DPNBUILD_NOSERIALSP
  60. typedef struct linemessage_tag LINEMESSAGE;
  61. #endif // ! DPNBUILD_NOSERIALSP
  62. //**********************************************************************
  63. // Variable definitions
  64. //**********************************************************************
  65. //**********************************************************************
  66. // Function prototypes
  67. //**********************************************************************
  68. #ifdef __cplusplus
  69. extern "C" {
  70. #endif // __cplusplus
  71. #ifdef DBG
  72. // don't call this function directly, use the 'DisplayDNError' macro
  73. void LclDisplayError( EC_TYPE ErrorType, DWORD ErrorLevel, HRESULT ErrorCode );
  74. void LclDisplayString( DWORD ErrorLevel, char *pString );
  75. #ifndef DPNBUILD_NOSERIALSP
  76. void LclDisplayTAPIMessage( DWORD ErrorLevel, const LINEMESSAGE *const pLineMessage );
  77. #endif // ! DPNBUILD_NOSERIALSP
  78. #endif // DBG
  79. #ifdef __cplusplus
  80. }
  81. #endif // __cplusplus
  82. #endif // __DNET_ERRORS_H__