#include <Windows.h>
#include <stdio.h>
#include <stdarg.h>
void __cdecl odprintf(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);
OutputDebugString(buf);
}
int main(void)
{
char fname[]="tmp.264";
FILE* f=fopen(fname,"rb");
if(!f)
odprintf("Cannot open file %s [err=%ld]", fname, GetLastError());
return 0;
}