How to get particular Event log entries from Event log using Event ID
I have tried ReadEventlog samples but it gets all the event i need to run a while loop to filter.
Instead of that kindly let me know how we can achieve it using any direct method or query using C++.
its like Example if we have 3000 events out of that 1000 event has Event id:150 .
how we can query it.
Code i have tried :
while (ERROR_SUCCESS == status)
{
if (!ReadEventLog(hEventLog,
EVENTLOG_SEQUENTIAL_READ | EVENTLOG_BACKWARDS_READ,
0,
pBuffer,
dwBytesToRead,
&dwBytesRead,
&dwMinimumBytesToRead))
{
....
}
}
Aucun commentaire:
Enregistrer un commentaire