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.

83 lines
937 B

  1. #include "headers.hxx"
  2. HINSTANCE hResourceModuleHandle = 0;
  3. const wchar_t* RUNTIME_NAME = L"coretest";
  4. DWORD DEFAULT_LOGGING_OPTIONS = Burnslib::Log::OUTPUT_TYPICAL;
  5. void
  6. f3()
  7. {
  8. LOG_FUNCTION(f3);
  9. LOG_LAST_WINERROR();
  10. {
  11. LOG_SCOPE(L"nested scope");
  12. }
  13. class Foo
  14. {
  15. public:
  16. Foo()
  17. {
  18. LOG_CTOR(Foo);
  19. }
  20. ~Foo()
  21. {
  22. LOG_DTOR(Foo);
  23. }
  24. void
  25. Method()
  26. {
  27. LOG_FUNCTION(Foo::Method);
  28. HRESULT hr = CO_E_RUNAS_LOGON_FAILURE;
  29. LOG_HRESULT(hr);
  30. }
  31. };
  32. Foo afoo;
  33. afoo.Method();
  34. }
  35. void
  36. f2()
  37. {
  38. LOG_FUNCTION2(f2, L"this is f2");
  39. f3();
  40. }
  41. void
  42. f1()
  43. {
  44. LOG_FUNCTION(f1);
  45. f2();
  46. }
  47. VOID
  48. _cdecl
  49. main(int, char **)
  50. {
  51. LOG_FUNCTION(main);
  52. LOG(L"Let the games begin");
  53. f1();
  54. LOG(L"now ending main");
  55. }