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.

51 lines
1.2 KiB

  1. #ifndef __REMOTESP_UTILS_H__
  2. #define __REMOTESP_UTILS_H__
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #ifdef TRACELOG
  7. #include <windows.h>
  8. #include <winbase.h>
  9. #include <rtutils.h>
  10. #define MAXDEBUGSTRINGLENGTH 1024
  11. #define TL_ERROR ((DWORD)0x00010000 | TRACE_USE_MASK)
  12. #define TL_WARN ((DWORD)0x00020000 | TRACE_USE_MASK)
  13. #define TL_INFO ((DWORD)0x00040000 | TRACE_USE_MASK)
  14. #define TL_TRACE ((DWORD)0x00080000 | TRACE_USE_MASK)
  15. #define TL_EVENT ((DWORD)0x00100000 | TRACE_USE_MASK)
  16. BOOL TRACELogRegister(LPCTSTR szName);
  17. void TRACELogDeRegister();
  18. void TRACELogPrint(IN DWORD dwDbgLevel, IN LPCSTR DbgMessage, IN ...);
  19. extern char *TraceLevel(DWORD dwDbgLevel);
  20. extern void TAPIFormatMessage(HRESULT hr, LPVOID lpMsgBuf);
  21. #define TRACELOGREGISTER(arg) TRACELogRegister(arg)
  22. #define TRACELOGDEREGISTER() TRACELogDeRegister()
  23. #define LOG(arg) TRACELogPrint arg
  24. extern char sg_szTraceName[100];
  25. extern DWORD sg_dwTracingToDebugger;
  26. extern DWORD sg_dwDebuggerMask;
  27. extern DWORD sg_dwTraceID;
  28. #else // TRACELOG not defined
  29. #define TRACELOGREGISTER(arg)
  30. #define TRACELOGDEREGISTER()
  31. #define LOG(arg)
  32. #endif // TRACELOG
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. #endif //__REMOTESP_UTILS_H_