ashokvishnu
May 19th, 2006, 01:05 AM
Hi All,
I am new to C++ and windows programming. We have to create an event logging mechanism similar to the one windows is already having, but we need to add some extra functionalities. I was going through win event log api. I created an event log file "myeventlog" under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\MyEventLog. I wrote some data to the file using ReportEvent event function. While looking at the file I see that some data is there. However while reading the file using GetNumberOfEventLogRecords i get zero. Niether do i get any record by using ReadEventLog function. Can anyone suggest any solutions?
I am new to C++ and windows programming. We have to create an event logging mechanism similar to the one windows is already having, but we need to add some extra functionalities. I was going through win event log api. I created an event log file "myeventlog" under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\MyEventLog. I wrote some data to the file using ReportEvent event function. While looking at the file I see that some data is there. However while reading the file using GetNumberOfEventLogRecords i get zero. Niether do i get any record by using ReadEventLog function. Can anyone suggest any solutions?