a513155803
2019-03-15 10:31VS2013中C++/CLR的EventLog问题
20代码如下
EventLog log = gcnew EventLog();
try
{
log.Source = "我的应用程序";
log.WriteEntry("处理信息1", EventLogEntryType::Information);
log.WriteEntry("处理信息2", EventLogEntryType::Information);
throw gcnew System::IO::FileNotFoundException("readme.txt文件未找到");
}
catch (System::IO::FileNotFoundException ^exception)
{
log.WriteEntry("处理信息2", EventLogEntryType::Error);
}
我这样写了后会报错:无法将参数 1 从“System::Diagnostics::EventLog ^”转换为“System::String ^”
就是那个EventLog log = gcnew EventLog();这里
- 点赞
- 回答
- 收藏
- 复制链接分享
2条回答
为你推荐
- VS2013中C++/CLR的EventLog问题
- c++
- 2个回答