Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
debug.h
Package: Visual C++视频音频开发实用工程案例精选.rar [view]
Upload User: tuheem
Upload Date: 2007-05-01
Package Size: 21889k
Code Size: 2k
Category:
Multimedia Develop
Development Platform:
Visual C++
- #ifdef _DEBUG
- #ifndef _MSC_VER
- int _CrtDbgReport(
- int reportType,
- const char *filename,
- int linenumber,
- const char *moduleName,
- const char *lpszFormat ,
- ...
- )
- {
- char szBuffer[1024];
- va_list args;
- va_start(args, lpszFormat);
- _vsnprintf(szBuffer, sizeof(szBuffer) / sizeof(WCHAR), lpszFormat, args);
- OutputDebugString(szBuffer);
- va_end(args);
- return 1;
- }
- #else
- #include <crtdbg.h>
- #endif
- #define CP_TRACE0(format) _CrtDbgReport(_CRT_WARN, __FILE__, __LINE__, NULL, format "n")
- #define CP_TRACE1(format, arg1) _CrtDbgReport(_CRT_WARN, __FILE__, __LINE__, NULL, format "n", arg1)
- #define CP_TRACE2(format, arg1, arg2) _CrtDbgReport(_CRT_WARN, __FILE__, __LINE__, NULL, format "n", arg1, arg2)
- #define CP_TRACE3(format, arg1, arg2, arg3) _CrtDbgReport(_CRT_WARN, __FILE__, __LINE__, NULL, format "n", arg1, arg2, arg3)
- #define CP_TRACE4(format, arg1, arg2, arg3, arg4) _CrtDbgReport(_CRT_WARN, __FILE__, __LINE__, NULL, format "n", arg1, arg2, arg3, arg4)
- #define CP_TRACE5(format, arg1, arg2, arg3, arg4, arg5) _CrtDbgReport(_CRT_WARN, __FILE__, __LINE__, NULL, format "n", arg1, arg2, arg3, arg4, arg5)
- //
- #define CP_ASSERT(expr) if(!(expr)) { CP_TRACE1("ASSERTION %s FAILS", #expr); __asm { int 3 } }
- #define CP_FAIL(errstring) { CP_TRACE1("HARD FAILURE %s", #errstring); __asm { int 3 } }
- //
- #define CP_CHECKOBJECT(obj_ptr_typed) if(!obj_ptr_typed || !_CrtIsMemoryBlock(obj_ptr_typed, sizeof(*obj_ptr_typed), NULL, NULL, NULL)) { CP_TRACE1("POINTER %s is Bogus", #obj_ptr_typed); __asm { int 3 } }
- #else
- #define CP_CHECKOBJECT(obj_ptr_typed) { }
- #define CP_ASSERT(expr) { }
- #define CP_FAIL(expr) { }
- #define CP_TRACE0(f) { }
- #define CP_TRACE1(f, e1) { }
- #define CP_TRACE2(f, e1, e2) { }
- #define CP_TRACE3(f, e1, e2, e3) { }
- #define CP_TRACE4(f, e1, e2, e3, e4) { }
- #define CP_TRACE5(f, e1, e2, e3, e4, e5){ }
- #endif