home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / audio / midiplyr / debug.h < prev    next >
C/C++ Source or Header  |  1997-10-05  |  2KB  |  70 lines

  1. /*****************************************************************************
  2. *
  3. *  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  4. *  ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
  5. *  TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR
  6. *  A PARTICULAR PURPOSE.
  7. *
  8. *  Copyright (C) 1993 - 1997 Microsoft Corporation. All Rights Reserved.
  9. *
  10. ******************************************************************************
  11. *
  12. * Debug.H
  13. *
  14. * Public include file for debug output
  15. *
  16. *****************************************************************************/
  17.  
  18. #ifndef _INC_DEBUG
  19. #define _INC_DEBUG
  20. #ifdef __cplusplus
  21. extern "C"
  22. {
  23. #endif
  24.  
  25. #define  ISRDEBUG             1
  26. #define  DEBUG_SECTION        "debug"        /* section name for                */
  27. #define  DEBUG_MODULE_NAME    "MIDIPLYR"     /* key name and prefix for output  */
  28. #define  DEBUG_MAX_LINE_LEN   255            /* max line length (bytes)         */
  29.                                              
  30. #define  DRV_ENABLE_DEBUG     (DRV_USER+1)   /* Enable/disable debug message    */
  31. #define  DRV_SET_DEBUG_LEVEL  (DRV_USER+2)   /* Message to set the debug level  */
  32.  
  33. #ifdef DEBUG
  34.     VOID WINAPI WinAssert(LPSTR lpstrExp, LPSTR lpstrFile, DWORD dwLine);
  35.     BOOL WINAPI DbgEnable(BOOL fEnable);
  36.     UINT WINAPI DbgSetLevel(UINT uLevel);
  37.     UINT WINAPI DbgInitialize(BOOL fEnable);
  38.  
  39.     void FAR CDECL dprintf(UINT uDbgLevel, LPSTR szFmt, ...);
  40.  
  41.     #define assert(exp) \
  42.         ( (exp) ? (void) 0 : WinAssert(#exp, __FILE__, __LINE__) )
  43.  
  44.     #define DPF                  dprintf
  45.  
  46.     #define D1(sz)               dprintf(1,sz) 
  47.     #define D2(sz)               dprintf(2,sz) 
  48.     #define D3(sz)               dprintf(3,sz) 
  49.     #define D4(sz)               dprintf(4,sz) 
  50. #else
  51.     #define assert(exp)          ((void)0)
  52.     
  53.     #define DbgEnable(x)         FALSE
  54.     #define DbgSetLevel(x)       0
  55.     #define DbgInitialize(x)     0
  56.  
  57.     #define DPF                  1 ? (void)0 : (void)
  58.  
  59.     #define D1(sz)
  60.     #define D2(sz)
  61.     #define D3(sz)
  62.     #define D4(sz)
  63. #endif
  64.  
  65.  
  66. #ifdef __cplusplus
  67. }
  68. #endif
  69. #endif
  70.