c++ - 如何使用 C++ 读取特定的事件日志条目?
问题描述
如何使用事件 ID 从事件日志中获取特定的事件日志条目
I have tried ReadEventlog samples but it gets all the event i need to run a while loop to filter.
相反,请让我知道我们如何使用任何直接方法或使用 C++ 的查询来实现它。
its like Example if we have 3000 events out of that 1000 event has Event id:150 .
我们如何查询它。
我试过的代码:
while (ERROR_SUCCESS == status)
{
if (!ReadEventLog(hEventLog,
EVENTLOG_SEQUENTIAL_READ | EVENTLOG_BACKWARDS_READ,
0,
pBuffer,
dwBytesToRead,
&dwBytesRead,
&dwMinimumBytesToRead))
{
....
}
}
解决方案
推荐阅读
- angular - 如何解决“日期”不是实例日期问题?
- javascript - 在点击事件上更改 `minicolors()` 的值
- javascript - 如何在 react-redux 上混合数组?
- c# - 如何修复 Entity Framework Core 错误“值不能为空。参数名称:frameworkName”?
- java - 修复 switch multiple case 语句
- python - 如何通过移动直线获得斜率?
- wordpress - 如何使用 Wordpress Gutenberg 为自定义帖子类型添加元框
- nested - BigQuery 更新多个嵌套列
- java - 保护 PDF 文件和 PDFBox 中的“saveIncremental”
- angular - 升级到 Angular 8 后的依赖注入问题