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.

18 lines
520 B

  1. //A Sample program to demonstrate use of managed software tracing
  2. #include "stdafx.h"
  3. #using <mscorlib.dll>
  4. #include <tchar.h>
  5. #using <TraceEvent.dll>
  6. using namespace System;
  7. using namespace Microsoft::Win32::Diagnostics;
  8. int _tmain(void)
  9. {
  10. Guid g("{8C8AC55E-834E-49cb-B993-75B69FBF6D97}");
  11. TraceProvider* MyProvider = new TraceProvider (S"SimpleExample App",g);
  12. MyProvider->TraceMessage(1,S"Composite formatting of a string: Hello |{0,30}|",S"World");
  13. return 0;
  14. }