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.

68 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 "stdafx.h"
  25. #include "reg.h"
  26. #if DBG
  27. #define SIZE_DEBUG_BUFFER 100
  28. /*******************************************************************************
  29. *
  30. * _DbgPrintf
  31. *
  32. * DESCRIPTION:
  33. * Simple implementation of the "debug printf" routine. Takes the given
  34. * format string and argument list and outputs the formatted string to the
  35. * debugger. Only available in debug builds-- use the DbgPrintf macro
  36. * defined in REGEDIT.H to access this service or to ignore the printf.
  37. *
  38. * PARAMETERS:
  39. * lpFormatString, printf-style format string.
  40. * ..., variable argument list.
  41. *
  42. *******************************************************************************/
  43. VOID
  44. CDECL
  45. _DbgPrintf(
  46. PSTR pFormatString,
  47. ...
  48. )
  49. {
  50. va_list arglist;
  51. CHAR DebugBuffer[SIZE_DEBUG_BUFFER];
  52. va_start(arglist, pFormatString);
  53. StringCchVPrintfA(DebugBuffer, ARRAYSIZE(DebugBuffer), pFormatString, arglist);
  54. OutputDebugStringA(DebugBuffer);
  55. // MessageBoxA(NULL, DebugBuffer, "RegEdit", MB_OK);
  56. }
  57. #endif