c# - 屏幕共享错误 - 当文件已存在时无法创建文件
问题描述
我正在使用下面的代码来共享屏幕。
namespace host
{
public partial class Form1 : Form
{
RDPSession x = new RDPSession();
private void button1_Click(object sender, EventArgs e)
{
x.OnAttendeeConnected += Incoming;
x.Open();
}
}
}
在 Windows 7 pc 中,我将在屏幕共享上随机收到以下代码行 RDPSession x = new RDPSession() 错误。
错误:
Creating an instance of the COM component with CLSID {9B78F0E6-3E05-4A5B-B2E8-E743A8956B65} from the IClassFactory failed due to the following error: 800700b7 Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7).
原因是什么以及如何解决此错误?
解决方案
完成 RDPSession 后,使用“Disconnect()”函数关闭连接。看看这是否可以为您解决问题。
推荐阅读
- django - 如何在 django 中使用 opencv 将彩色图像转换为灰度图像
- neo4j - 为全文搜索运行 2 个密码查询在 neo4j 中返回错误
- arrays - 在“工作表 B”中创建新行时重复“工作表 A”
- java - 如何在 Intellij IDEA 中找到注解的处理器类?
- linux - 在 bash 脚本中切换到 root 用户
- three.js - 如何在特定关键帧处停止动画
- naming-conventions - “懒惰”在编程意义上是什么意思?
- powershell - 在 PowerShell 中过滤重复消息?
- angular - 如何在 Ionic 3 中发送电子邮件(不使用电子邮件编辑器)
- scala - 如何获取传递给 Scala 宏的参数的运行时值?