网站首页  词典首页

请输入您要查询的函数:

 

术语 cleareventlog
释义 ClearEventLog
语法:
C++
BOOL ClearEventLog(
__in HANDLE hEventLog,
__in LPCTSTR lpBackupFileName
);
ClearEventLog功能
清除指定的事件日志,并可以选择保存当前的日志拷贝到备份文件。
参数
hEventLog [in]
句柄到事件日志被清除。该OpenEventLog函数返回此句柄。
lpBackupFileName [in]
在备份文件的绝对或相对路径。如果此文件已经存在,函数失败。
如果lpBackupFileName参数为NULL,事件日志是没有备份。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。该ClearEventLog函数可能会失败,如果事件日志是空的或备份文件已存在。
备注
这个函数返回后,任何处理的清除事件日志不能用于读取日志参考。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode和ANSI namesClearEventLogW(Unicode)和ClearEventLogA(ANSI)的
参见
事件记录功能
OpenEventLog
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月6日
==英文原文==ClearEventLog Function
Clears the specified event log, and optionally saves the current copy of the log to a backup file.
Syntax
C++
BOOL ClearEventLog(
__in HANDLE hEventLog,
__in LPCTSTR lpBackupFileName
);
Parameters
hEventLog [in]
A handle to the event log to be cleared. The OpenEventLog function returns this handle.
lpBackupFileName [in]
The absolute or relative path of the backup file. If this file already exists, the function fails.
If the lpBackupFileName parameter is NULL, the event log is not backed up.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError . The ClearEventLog function can fail if the event log is empty or the backup file already exists.
Remarks
After this function returns, any handles that reference the cleared event log cannot be used to read the log.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode and ANSI namesClearEventLogW (Unicode) and ClearEventLogA (ANSI)
See Also
Event Logging Functions
OpenEventLog
Send comments about this topic to Microsoft
Build date: 8/6/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa363637(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:32:29