windows-nt/Source/XPSP1/NT/shell/ext/cabview/logger.c
2020-09-26 16:20:57 +08:00

30 lines
436 B
C

#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);
}
}