win32调试打印

时间:2022-04-12 06:01:30

void __cdecl OutputDebugStringF(const char* format ...){
va_list vlArgs;
char* stringBuffer=(char*)GlobalAlloc(GPTR,4096);
va_start(vl_Args,format);
_vsnprintf(stringBuffer,4096,-1,format,vlArgs);
va_end(vlArgs);
strcat(stringBuffer,"\n");
OutputDebugStringA(stringBuffer);
GlobalFree(stringBuffer);
return;
}