时间:2021-07-01 10:21:17 帮助过:96人阅读
void __cdecl DbgPrintW(const char *format, ...){ char buf[4096], *p = buf; va_list args; va_start(args, format); p += _vsnprintf(p, sizeof buf - 1, format, args); va_end(args); OutputDebugStringW((LPCWSTR)buf);}void __cdecl DbgPrintA(const char *format, ...){ char buf[4096], *p = buf; va_list args; va_start(args, format); p += _vsnprintf(p, sizeof buf - 1, format, args); va_end(args); OutputDebugStringA(buf);}
调用很简单:
DbgPrintA("c_name = %s",c_name);