Source code of Windows XP (NT5)
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.

95 lines
1.7 KiB

  1. /*****************************************************************************\
  2. DEBUGAPI.H
  3. Confidential
  4. Copyright (c) Corporation 1998
  5. All rights reserved
  6. Debug API function prototypes and defined values.
  7. 12/98 - Jason Cohen (JCOHEN)
  8. 09/2000 - Stephen Lodwick (STELO)
  9. Ported OPK Wizard to Whistler
  10. \*****************************************************************************/
  11. // Only include this file once.
  12. //
  13. #ifndef _DEBUGAPI_H_
  14. #define _DEBUGAPI_H_
  15. #ifdef DBG
  16. // Make sure both DEBUG and _DEBUG are defined.
  17. //
  18. #ifndef DBG
  19. #define DBG
  20. #endif // DEBUG
  21. //
  22. // Include File(s):
  23. //
  24. #include <windows.h>
  25. #include <tchar.h>
  26. //
  27. // Defined Value(s):
  28. //
  29. #if defined(UNICODE) || defined(_UNICODE)
  30. #define DebugOut DebugOutW
  31. #else // UNICODE || _UNICODE
  32. #define DebugOut DebugOutA
  33. #endif // UNICODE || _UNICODE
  34. #define ELSEDBG else
  35. #define ELSEDBGOUT else DBGOUT
  36. #define ELSEDBGMSGBOX else MsgBoxStr
  37. #define DBGMSGBOX MsgBoxStr
  38. #define DBGOUT DebugOut
  39. #define DBGOUTW DebugOutW
  40. #define DBGOUTA DebugOutA
  41. #define DBGLOG _T("C:\\DEBUG.LOG")
  42. #define DBGLOGW L"C:\\DEBUG.LOG"
  43. #define DBGLOGA "C:\\DEBUG.LOG"
  44. //
  45. // External Function(s):
  46. //
  47. INT DebugOutW(LPCWSTR, LPCWSTR, ...);
  48. INT DebugOutA(LPCSTR, LPCSTR, ...);
  49. #else // DEBUG || _DEBUG
  50. //
  51. // Defined Value(s):
  52. //
  53. #define ELSEDBG
  54. #define ELSEDBGOUT
  55. #define ELSEDBGMSGBOX
  56. #define DBGMSGBOX { }
  57. #define DBGOUT { }
  58. #define DBGOUTW { }
  59. #define DBGOUTA { }
  60. #define DBGLOG NULL
  61. #define DBGLOGW NULL
  62. #define DBGLOGA NULL
  63. #endif // DEBUG || _DEBUG
  64. #endif // _DEBUGAPI_H_