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.

62 lines
1015 B

  1. //+----------------------------------------------------------------------------
  2. //
  3. // Copyright (C) 1992, Microsoft Corporation
  4. //
  5. // File: tracetest.cpp
  6. //
  7. // Contents: Unit test for tracing
  8. //
  9. // Functions: main
  10. //
  11. // History: 4/6/99 AshishS created
  12. //
  13. //-----------------------------------------------------------------------------
  14. //
  15. // System Includes
  16. //
  17. extern "C" {
  18. #include <windows.h>
  19. };
  20. //
  21. // Project Includes
  22. //
  23. #include <dbgtrace.h>
  24. #ifdef THIS_FILE
  25. #undef THIS_FILE
  26. #endif
  27. static char __szTraceSourceFile[] = __FILE__;
  28. #define THIS_FILE __szTraceSourceFile
  29. int TestFunction()
  30. {
  31. TraceFunctEnter("TestFunction");
  32. for (int i=0; i < 10; i++)
  33. {
  34. DebugTrace(1, "Hope this works %d",i);
  35. }
  36. TraceFunctLeave();
  37. return(0);
  38. }
  39. int _cdecl main(int argc, CHAR ** argv)
  40. {
  41. int i;
  42. #if !NOTRACE
  43. InitAsyncTrace();
  44. #endif
  45. TestFunction();
  46. TermAsyncTrace();
  47. return(0);
  48. }