windows-nt/Source/XPSP1/NT/base/ntsetup/oempre/eventclear/eventclear.c

36 lines
671 B
C
Raw Permalink Normal View History

2020-09-26 03:20:57 -05:00
#include <windows.h>
#include <stdio.h>
int WINAPI
WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow
)
{
HANDLE hEventLog;
hEventLog = OpenEventLog( NULL, "System" );
if (hEventLog) {
ClearEventLog( hEventLog, NULL );
CloseEventLog( hEventLog );
}
hEventLog = OpenEventLog( NULL, "Application" );
if (hEventLog) {
ClearEventLog( hEventLog, NULL );
CloseEventLog( hEventLog );
}
hEventLog = OpenEventLog( NULL, "Security" );
if (hEventLog) {
ClearEventLog( hEventLog, NULL );
CloseEventLog( hEventLog );
}
return 0;
}