windows-nt/Source/XPSP1/NT/shell/ext/cabview/logger.c

30 lines
436 B
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
#include <stdio.h>
#include <stdarg.h>
#include <windows.h>
#include "logger.h"
void Log(char *pszfmt, ...)
{
char message[1000];
va_list args;
FILE *logFile;
logFile = fopen("c:\\cabview.txt","a");
if (logFile != NULL)
{
va_start(args,pszfmt);
vsprintf(message,pszfmt,args);
va_end(args);
fprintf(logFile,message);
fclose(logFile);
}
else
{
Beep(0,0);
}
}