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.

42 lines
1.1 KiB

  1. #ifndef _DBG_H_
  2. #define _DBG_H_
  3. ////////////////////////////////////////////////////////
  4. // Function: Dbg
  5. // Type : VOID
  6. // Purpose : Printing debug message with same usage as printf()
  7. // Args :
  8. // : LPSTR lpstrFuncName
  9. // : ...
  10. // CAUTION: Please use DOUBLE Blaket!!!
  11. /////////////////////////////////////////////////////////
  12. //VOID Dbg((LPSTR lpstrFuncName, ...));
  13. #ifndef UNICODE_ONLY
  14. extern VOID _dbgA (LPSTR lpstrFile, INT lineNo, LPSTR lpstrMsg);
  15. extern VOID _dbgPrintA (LPSTR lpstrMsg, ...);
  16. extern LPSTR _dbgVaStrA (LPSTR lpstrFmt, ...);
  17. #endif
  18. #ifndef ANSI_ONLY
  19. extern VOID _dbgW(LPWSTR lpstrFile, INT lineNo, LPWSTR lpstrMsg);
  20. extern VOID _dbgPrintW(LPWSTR lpstrMsg, ...);
  21. extern LPWSTR _dbgVaStrW(LPWSTR lpstrFmt, ...);
  22. #endif
  23. #ifdef _DEBUG
  24. # ifdef UNICODE
  25. # define Dbg(a) _dbgW(TEXT(__FILE__), __LINE__, _dbgVaStrW a)
  26. # define DbgP(a) _dbgPrintW(_dbgVaStrW a)
  27. # else //!UNICODE
  28. # define Dbg(a) _dbgA(__FILE__, __LINE__, _dbgVaStrA a)
  29. # define DbgP(a) _dbgPrintA(_dbgVaStrA a)
  30. # endif //UNICODE
  31. #else //!_DEBUG
  32. # define Dbg(a)
  33. #endif //_DEBUG
  34. #endif //_DBG_H_