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.

29 lines
1.0 KiB

  1. //
  2. // Debugging macros
  3. //
  4. #if DBG
  5. # define DBG_CODE 1
  6. void DbgPrintf( LPTSTR szFmt, ... );
  7. void DbgStopX(LPSTR mszFile, int iLine, LPTSTR szText );
  8. //HLOCAL MemAllocWorker(LPSTR szFile, int iLine, UINT uFlags, UINT cBytes);
  9. // HLOCAL MemFreeWorker(LPSTR szFile, int iLine, HLOCAL hMem);
  10. void MemExitCheckWorker(void);
  11. //# define MemAlloc( f, s ) MemAllocWorker( __FILE__, __LINE__, f, s )
  12. //# define MemFree( h ) MemFreeWorker( __FILE__, __LINE__, h )
  13. # define MEM_EXIT_CHECK() MemExitCheckWorker()
  14. # define DBGSTOP( t ) DbgStopX( __FILE__, __LINE__, TEXT(t) )
  15. # define DBGSTOPX( f, l, t ) DbgStopX( f, l, TEXT(t) )
  16. # define DBGPRINTF(p) DbgPrintf p
  17. # define DBGOUT(t) DbgPrintf( TEXT("SYSCPL.CPL: %s\n"), TEXT(t) )
  18. #else
  19. //# define MemAlloc( f, s ) LocalAlloc( f, s )
  20. //# define MemFree( h ) LocalFree( h )
  21. # define MEM_EXIT_CHECK()
  22. # define DBGSTOP( t )
  23. # define DBGSTOPX( f, l, t )
  24. # define DBGPRINTF(p)
  25. # define DBGOUT(t)
  26. #endif