如何对windows2000的系统日志文件(*.evt)进行读写操作,windows对此提供了哪些api函数,请各位多多指教,谢谢!

解决方案 »

  1.   

    看MSDN中
    Platform SDK: Debugging and Error Handling 
    里的
    Event Logging  Function Description 
    BackupEventLog Saves the specified event log to a backup file. 
    ClearEventLog Clears the specified event log, and optionally saves the current copy of the logfile to a backup file. 
    CloseEventLog Closes a read handle to the specified event log. 
    DeregisterEventSource Closes a write handle to the specified event log. 
    GetEventLogInformation Retrieves information about the specified event log. 
    GetNumberOfEventLogRecords Retrieves the number of records in the specified event log. 
    GetOldestEventLogRecord Retrieves the absolute record number of the oldest record in the specified event log. 
    NotifyChangeEventLog Enables an application to receive notification when an event is written to the specified event logfile. 
    OpenBackupEventLog Opens a handle to a backup event log. 
    OpenEventLog Opens a handle to an event log. 
    ReadEventLog Reads a whole number of entries from the specified event log. 
    RegisterEventSource Retrieves a registered handle to an event log. 
    ReportEvent Writes an entry at the end of the specified event log. 
      

  2.   

    This library provides easy access to local and remote NT-Win2K-XP Event Logs. This library makes reading EventLog records as easy as a Recordset object.http://www.killervb.com/EventLogLib.aspx