This topic has not yet been rated - Rate this topic

ClearEventLog method of the Win32_NTEventlogFile class

The ClearEventLog method clears the specified event log.

This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.

Syntax


uint32 ClearEventLog(
  [in]  string ArchiveFileName
);

Parameters

ArchiveFileName [in]

Path and file name of the file to be cleared.

Note  If the ArchiveFileName comes from a source that you do not know or trust, then this value should be verified before using it in a call to ClearEventLog.

Return value

Return codeDescription
0

Success

8

Privilege Missing

21

Invalid Parameter

 

Examples

For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.

For C++ code examples, see WMI C++ Application Examples.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Namespace

\root\CIMV2

MOF

Ntevt.mof

DLL

Ntevt.dll

See also

Operating System Classes
Win32_NTEventlogFile

 

 

Send comments about this topic to Microsoft

Build date: 11/19/2012

Community Additions

ADD
© 2013 Microsoft. All rights reserved.