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.

47 lines
970 B

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 1998, 1999, 2000
  4. *
  5. * TITLE: ISDBG.H
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: ShaunIv
  10. *
  11. * DATE: 1/13/1999
  12. *
  13. * DESCRIPTION: Simple OutputDebugString wrapper
  14. *
  15. *******************************************************************************/
  16. #ifndef __ISDBG_H_INCLUDED
  17. #define __ISDBG_H_INCLUDED
  18. #if defined(_DEBUG) || defined(DBG)
  19. #include <stdarg.h>
  20. #include <stdio.h>
  21. inline void __DebugPrintf( LPCTSTR pszFmt, ... )
  22. {
  23. TCHAR szMsg[1024];
  24. va_list ArgPtr;
  25. va_start(ArgPtr, pszFmt);
  26. wvsprintf(szMsg, pszFmt, ArgPtr);
  27. va_end(ArgPtr);
  28. #if 0
  29. FILE *fp = fopen( "c:\\ss.dbg", "at" );
  30. fprintf( fp, "%S", szMsg );
  31. fclose( fp );
  32. #endif
  33. OutputDebugString(szMsg);
  34. }
  35. #define DEBUG_PRINTF(x) __DebugPrintf x
  36. #else
  37. #define DEBUG_PRINTF(x)
  38. #endif // DBG or _DEBUG
  39. #endif //__ISDBG_H_INCLUDED