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.

40 lines
1.0 KiB

  1. #ifndef __BASECSP__DEBUG__H
  2. #define __BASECSP__DEBUG__H
  3. #include <windows.h>
  4. #include <dsysdbg.h>
  5. //
  6. // Debug Support
  7. //
  8. // This uses the debug routines from dsysdbg.h
  9. // Debug output will only be available in chk
  10. // bits.
  11. //
  12. DECLARE_DEBUG2(Basecsp)
  13. #define DEB_TRACE_CSP 0x00000001
  14. #define DEB_TRACE_FINDCARD 0x00000002
  15. #define DEB_TRACE_CACHE 0x00000004
  16. #define DEB_TRACE_MEM 0x00000008
  17. #define DEB_TRACE_CRYPTOAPI 0x00000010
  18. #if DBG
  19. #define DebugLog(x) BasecspDebugPrint x
  20. #else
  21. #define DebugLog(x)
  22. #endif
  23. #define LOG_CHECK_ALLOC(x) \
  24. { if (NULL == x) { \
  25. dwSts = ERROR_NOT_ENOUGH_MEMORY; \
  26. DebugLog((DEB_TRACE_MEM, "%s: Allocation failed\n", #x)); \
  27. goto Ret; \
  28. } }
  29. void CspInitializeDebug(void);
  30. void CspUnloadDebug(void);
  31. #endif