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.

50 lines
1011 B

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997 - 1999
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. // File: S T E E L H E A D . C P P
  7. //
  8. // Contents: Implementation of Steelhead configuration object.
  9. //
  10. // Notes:
  11. //
  12. // Author: shaunco 15 Jun 1997
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "stdafx.h"
  16. #pragma hdrstop
  17. #include "ncutil.h"
  18. extern DWORD g_dwTraceHandle;
  19. void TraceError(LPCSTR pszString, HRESULT hr)
  20. {
  21. if (!SUCCEEDED(hr))
  22. {
  23. TraceResult(pszString, hr);
  24. }
  25. }
  26. void TraceResult(LPCSTR pszString, HRESULT hr)
  27. {
  28. if (SUCCEEDED(hr))
  29. TracePrintf(g_dwTraceHandle,
  30. _T("%hs succeeded : hr = %08lx"),
  31. pszString, hr);
  32. else
  33. TracePrintf(g_dwTraceHandle,
  34. _T("%hs failed : hr = %08lx"),
  35. pszString, hr);
  36. }
  37. void TraceSz(LPCSTR pszString)
  38. {
  39. TracePrintf(g_dwTraceHandle,
  40. _T("%hs"),
  41. pszString);
  42. }