/* Start the event logging for windows */ void win_startel(char *evt_log) { int entries_count = 0; /* Maximum size */ if (el_last == 9) { merror(EVTLOG_DUP, ARGV0, evt_log); return; } /* Create the DLL hash */ if (!dll_hash) { dll_hash = OSHash_Create(); if (!dll_hash) { merror("%s: ERROR: Unable to create DLL hash.", ARGV0); } } /* Start event log -- going to last available record */ if ((entries_count = startEL(evt_log, &el[el_last])) < 0) { merror(INV_EVTLOG, ARGV0, evt_log); return; } else { readel(&el[el_last], 0); } el_last++; }
/** void win_readel() * Reads the event logging for windows */ void win_readel() { int i = 0; /* Sleep plus 2 seconds before reading again */ Sleep(2000); for(;i<el_last;i++) readel(&el[i],1); }
/** void win_startel() * Starts the event logging for windows */ void win_startel(char *evt_log) { startEL(evt_log, &el[el_last]); readel(&el[el_last],1); el_last++; }