dbg.h
资源名称:Filters1.rar [点击查看]
上传用户:shjinghong
上传日期:2008-12-31
资源大小:4820k
文件大小:2k
源码类别:
DirextX编程
开发平台:
Visual C++
- //------------------------------------------------------------------------------
- // File: Dbg.h
- //
- // Desc: DirectShow sample code - Helper file for the PSIParser filter.
- //
- // Copyright (c) Microsoft Corporation. All rights reserved.
- //------------------------------------------------------------------------------
- // dump a string to debug output
- #define Dump(tsz)
- OutputDebugString(tsz);
- #define DumpAndReturnFalse(tsz)
- {OutputDebugString(tsz);
- return false;}
- // dump a string with a parameter value to debug output
- #define Dump1(tsz, arg)
- { TCHAR dbgsup_tszDump[1024];
- wsprintf(dbgsup_tszDump, (tsz), (arg));
- OutputDebugString(dbgsup_tszDump); }
- #define CHECK_ERROR(tsz,hr)
- { if( !SUCCEEDED(hr) )
- {
- TCHAR dbgsup_tszDump[1024];
- wsprintf(dbgsup_tszDump, (tsz), (hr));
- OutputDebugString(dbgsup_tszDump);
- return hr;
- }
- }
- #define RETURN_FALSE_IF_FAILED(tsz,hr)
- { if( S_OK != hr)
- {
- TCHAR dbgsup_tszDump[1024];
- wsprintf(dbgsup_tszDump, (tsz), (hr));
- OutputDebugString(dbgsup_tszDump);
- return FALSE;
- }
- }
- #define CHECK_BADPTR(tsz,ptr)
- {
- TCHAR dbgsup_tszDump[1024];
- if( ptr == 0)
- {
- wsprintf(dbgsup_tszDump, (tsz), (ptr));
- OutputDebugString(dbgsup_tszDump);
- return E_FAIL;
- }
- }
- #define RETURN_FALSE_IF_BADPTR(tsz,ptr)
- {
- TCHAR dbgsup_tszDump[1024];
- if( ptr == 0)
- {
- wsprintf(dbgsup_tszDump, (tsz), (ptr));
- OutputDebugString(dbgsup_tszDump);
- return FALSE;
- }
- }
English
