- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
rxdebug.cpp
资源名称:toolbar.rar [点击查看]
上传用户:rundaa
上传日期:2009-05-24
资源大小:44k
文件大小:1k
源码类别:
CAD
开发平台:
Visual C++
- #include "stdafx.h"
- #ifdef _DEBUG
- #include "rxdebug.h"
- #ifndef _WINBASE_
- //extracted from winbase.h so that
- //we don't have to pull in the whole
- //header
- extern "C"
- void
- _stdcall
- OutputDebugStringA(
- const char* lpOutputString
- );
- extern "C"
- void
- _stdcall
- OutputDebugStringW(
- const unsigned short* lpOutputString
- );
- #ifdef UNICODE
- #define OutputDebugString OutputDebugStringW
- #else
- #define OutputDebugString OutputDebugStringA
- #endif // !UNICODE
- #endif //_WINBASE
- // determine number of elements in an array (not bytes)
- #define _countof(array) (sizeof(array)/sizeof(array[0]))
- inline void _cdecl RxTrace(const TCHAR* lpszFormat, ...)
- {
- va_list args;
- va_start(args, lpszFormat);
- int nBuf;
- TCHAR szBuffer[512];
- nBuf = _vsntprintf(szBuffer, _countof(szBuffer), lpszFormat, args);
- // was there an error?
- RXASSERT(nBuf >= 0);
- ::OutputDebugString(szBuffer);
- va_end(args);
- }
- #endif //_DEBUG, entire file