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.

69 lines
1.0 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. All rights reserved.
  4. Module Name:
  5. dbgstate.cxx
  6. Abstract:
  7. auto log
  8. Author:
  9. Larry Zhu (LZhu) December 6, 2001
  10. Revision History:
  11. --*/
  12. #include "precomp.hxx"
  13. #pragma hdrstop
  14. #include "dbgstate.hxx"
  15. #ifdef DBG
  16. TDbgGlobals g_DbgGlobals = {
  17. 0, // major version
  18. 0, // minor version
  19. NULL, // debug prompt
  20. };
  21. /********************************************************************
  22. some useful stuff
  23. ********************************************************************/
  24. VOID AutoLogOutputDebugStringPrintf(
  25. IN PCTSTR pszFmt,
  26. IN ...
  27. )
  28. {
  29. TCHAR szBuffer[4096] = {0};
  30. va_list pArgs;
  31. va_start(pArgs, pszFmt);
  32. _vsntprintf(szBuffer, COUNTOF(szBuffer), pszFmt, pArgs);
  33. OutputDebugString(szBuffer);
  34. va_end(pArgs);
  35. }
  36. VOID __cdecl
  37. DbgStateC2CppExceptionTransFunc(
  38. IN UINT u,
  39. IN EXCEPTION_POINTERS* pExp
  40. )
  41. {
  42. throw u;
  43. }
  44. #endif