Desktop Functions: Smart Device Functions:
|
BackupEventLog (advapi32)
C# Signature:
[DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] VB Signature:
Declare Function BackupEventLog Lib "advapi32.dll" (TODO) As TODO User-Defined Types:None. Alternative Managed API:EventLogSession from the namespace System.Diagnostics.Eventing.Reader can be used in most cases (Windows Vista and above only and .NET 4 or above. This throws a PlatformNotSupportedException on Windows XP and Windows 2003 with .NET 4) To save the 'Appllication' event log: EventLogSession eventLogSession = new EventLogSession(); eventLogSession.ExportLogAndMessages("Application", PathType.LogName, "", @"logFile.evtx", /tolerateQueryErrors*/ false, CultureInfo.CurrentCulture); Notes:None. Tips & Tricks:Please add some! Sample Code:Save the application log to disk:
[DllImport("advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)] Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|