TDebug.cs 847 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Net;
  5. using System.Net.Sockets;
  6. using System.IO;
  7. using System.Threading;
  8. using System.Runtime.Serialization.Formatters.Binary;
  9. using System.Runtime.InteropServices;
  10. using System.Reflection;
  11. namespace FPER
  12. {
  13. class TDebug
  14. {// »ç¿ë ¾ÈÇÔ
  15. [DllImport("kernel32.dll")]
  16. static extern void OutputDebugString(string message);
  17. public static void DoPrintDBGMSG(string str)
  18. {
  19. str = "[FPER]" + System.DateTime.Now.ToString("[hh:mm:ss]") + ":" + str;
  20. OutputDebugString(str);
  21. }
  22. public static void OpenDBGMSG(string str)
  23. {
  24. DoPrintDBGMSG("+" + str);
  25. }
  26. public static void CloseDBGMSG(string str)
  27. {
  28. DoPrintDBGMSG("-" + str);
  29. }
  30. }
  31. }