/**
* @param[in] pszSrcName example {"application","system","security"}
*/
BOOL MyClearEventLog(LPTSTR pszSrcName)
{
HANDLE hEventLog;
BOOL bRet;
hEventLog = OpenEventLog(NULL, pszSrcName);
if (NULL == hEventLog)
{
return FALSE;
}
bRet = ClearEventLog(hEventLog, NULL);
CloseEventLog(hEventLog);
return bRet;
}
简单清除windows事件日志
最新推荐文章于 2024-04-21 14:51:01 发布