调试函数OutputDebugString 支持变参

来源:互联网 发布:手机淘宝装修模板 编辑:程序博客网 时间:2024/05/16 11:28

void MyOutputDebugString( LPCSTR pszFormat, ...)
{
    va_list argp;
    char pszBuf[ 256];
    va_start(argp, pszFormat);
    vsprintf( pszBuf, pszFormat, argp);
    va_end(argp);
    OutputDebugString( pszBuf);
}