Annotation of mstools/ole20/samples/ole2ui/debug.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * DEBUG.H
                      3:  *
                      4:  * Definitions, structures, types, and function prototypes for debugging
                      5:  * purposes.
                      6:  *
                      7:  * Copyright (c)1992 Microsoft Corporation, All Right Reserved,
                      8:  * as applied to redistribution of this source code in source form
                      9:  * License is granted to use of compiled code in shipped binaries.
                     10:  */
                     11: 
                     12: #ifndef _DEBUG_H_
                     13: #define _DEBUG_H_
                     14: 
                     15: #ifdef DEBUG
                     16: 
                     17: //Basic debug macros
                     18: #define D(x)        {x;}
                     19: #define ODS(x)      D(OutputDebugString(x);OutputDebugString("\r\n"))
                     20: 
                     21: #define ODSsz(f, s)  {\
                     22:                      char        szDebug[128];\
                     23:                      wsprintf(szDebug, f, (LPSTR)s);\
                     24:                      ODS(szDebug);\
                     25:                      }
                     26: 
                     27: 
                     28: #define ODSu(f, u)  {\
                     29:                     char        szDebug[128];\
                     30:                     wsprintf(szDebug, f, (UINT)u);\
                     31:                     ODS(szDebug);\
                     32:                     }
                     33: 
                     34: 
                     35: #define ODSlu(f, lu) {\
                     36:                      char        szDebug[128];\
                     37:                      wsprintf(szDebug, f, (DWORD)lu);\
                     38:                      ODS(szDebug);\
                     39:                      }
                     40: 
                     41: #define ODSszu(f, s, u) {\
                     42:                         char        szDebug[128];\
                     43:                         wsprintf(szDebug, f, (LPSTR)s, (UINT)u);\
                     44:                         ODS(szDebug);\
                     45:                         }
                     46: 
                     47: 
                     48: #define ODSszlu(f, s, lu) {\
                     49:                           char        szDebug[128];\
                     50:                           wsprintf(szDebug, f, (LPSTR)s, (DWORD)lu);\
                     51:                           ODS(szDebug);\
                     52:                           }
                     53: 
                     54: 
                     55: #else   //NO DEBUG
                     56: 
                     57: #define D(x)
                     58: #define ODS(x)
                     59: 
                     60: #define ODSsz(f, s)
                     61: #define ODSu(f, u)
                     62: #define ODSlu(f, lu)
                     63: #define ODSszu(f, s, u)
                     64: #define ODSszlu(f, s, lu)
                     65: 
                     66: 
                     67: #endif //DEBUG
                     68: 
                     69: #endif //_DEBUG_H_

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.