在尝试读取 Windows 日志时,我有时会收到带有消息的 EventLogException:“传递给系统调用的数据区域太小”。我几乎从 msdn 中复制了这个例子。
EventRecord eventInstance = null;
try
{
eventInstance = logReader.ReadEvent();
}
catch (EventLogException e)
{
//...
}
Run Code Online (Sandbox Code Playgroud)
我看不到错误发生的时间和原因。
归档时间: |
|
查看次数: |
649 次 |
最近记录: |