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.

67 lines
1.7 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORP., 1993-1994
  4. *
  5. * TITLE: REGDEBUG.C
  6. *
  7. * VERSION: 4.0
  8. *
  9. * AUTHOR: Tracy Sharpe
  10. *
  11. * DATE: 21 Nov 1993
  12. *
  13. * Debug routines for the Registry Editor.
  14. *
  15. ********************************************************************************
  16. *
  17. * CHANGE LOG:
  18. *
  19. * DATE REV DESCRIPTION
  20. * ----------- --- -------------------------------------------------------------
  21. * 21 Nov 1993 TCS Original implementation.
  22. *
  23. *******************************************************************************/
  24. #include "pch.h"
  25. #if DBG
  26. #define SIZE_DEBUG_BUFFER 100
  27. /*******************************************************************************
  28. *
  29. * _DbgPrintf
  30. *
  31. * DESCRIPTION:
  32. * Simple implementation of the "debug printf" routine. Takes the given
  33. * format string and argument list and outputs the formatted string to the
  34. * debugger. Only available in debug builds-- use the DbgPrintf macro
  35. * defined in REGEDIT.H to access this service or to ignore the printf.
  36. *
  37. * PARAMETERS:
  38. * lpFormatString, printf-style format string.
  39. * ..., variable argument list.
  40. *
  41. *******************************************************************************/
  42. VOID
  43. CDECL
  44. _DbgPrintf(
  45. PSTR pFormatString,
  46. ...
  47. )
  48. {
  49. va_list arglist;
  50. CHAR DebugBuffer[SIZE_DEBUG_BUFFER];
  51. va_start(arglist, pFormatString);
  52. StringCchVPrintfA(DebugBuffer, ARRAYSIZE(DebugBuffer), pFormatString, arglist);
  53. OutputDebugStringA(DebugBuffer);
  54. // MessageBoxA(NULL, DebugBuffer, "RegEdit", MB_OK);
  55. }
  56. #endif